• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

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,243
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