• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Need help with hotkey trigger

Status
Not open for further replies.
Level 1
Joined
May 29, 2009
Messages
1
I want to make a trigger so when you type -fr it will change the hotkey for one of the buttons in this custom map (Worldcup of Warcraft) from V to F. And type -nofr to change it back from F to V.

And I also want to prompt a message to the person who just used it "To set default heading key - V, write -nofr"

ps Im not too good at world editor especially triggers if you could help just with this it would be so nice!
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
By "one of the buttons" do you mean ability buttons?

  • Trigger 1
    • Events
      • Player - Player 1 (Red) types a chat message containing -fr as An exact match
      • Player - Player 2 (Blue) types a chat message containing -fr as An exact match
    • Conditions
    • Actions
      • Player Group - Add (Triggering player) to Temp_Player_Group
      • Set Temp_Group = (Units in (Playable map area) matching (((Owner of (Matching unit)) Equal to (Triggering player)) and ((Unit-type of (Matching unit)) Equal to Footman)))
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Set Temp_Integer_1 = (Level of Acid Bomb for (Picked unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Temp_Integer_1 Greater than 0
            • Then - Actions
              • Unit - Remove Acid Bomb from (Picked unit)
              • Unit - Add Acid Bomb to (Triggering unit)
              • Unit - Set level of Acid Bomb for (Picked unit) to Temp_Integer_1
            • Else - Actions
      • Custom script: call DestroyGroup(udg_Temp_Group)
      • Quest - Display to Temp_Player_Group the Hint message: Type -nofr to chang...
      • Player Group - Remove (Triggering player) from Temp_Player_Group
Create a skill and copy it. Change the other ability's hotkey to V and the other's to F. Then when you type -fr, remove one ability and add the other.

Create another trigger that changes the skills again.
 
Status
Not open for further replies.
Top