• 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.

Movespeed Trigger

Status
Not open for further replies.
Level 2
Joined
Jun 30, 2007
Messages
19
Any information on how to show your hero's movespeed by typing -ms like the one in DotA?
 

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,550
This trigger is sure to help you:

  • Sojobo
    • Events
      • Player - Player 1 (Red) types a chat message containing -ms as An exact match
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units currently selected by Player 1 (Red)) and do (Game - Display to Player Group - Player 1 (Red) the text: (The speed of your hero is + (String((Current movement speed of (Picked unit))))))
For the message displaying, first select Arithmetic (selected by default), there should be String 1 and String 2. Select String 1, and type the message you want to be displayed (I chose "The speed of your hero is").
Now comes an addition sign, and in String 2, choose Conversion - Convert Real to String. Select Unit - Movement Speed (Current).
Current movement speed of (Picked Unit)

Click Ok, and that's it, your trigger is fully working. Don't forget about the custom script, or the trigger will cause a leak, which will pile up in the memory and cause lag in your game.
 
Status
Not open for further replies.
Top