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

[Solved] how can i do a comand for move speed?

Status
Not open for further replies.
Level 2
Joined
Apr 22, 2011
Messages
10
hii i want to do a comand for move speed like dota , when you tipe -ms it show a text with your actual move speed. how can a i do that?
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
Trigger editor
Event: Player - Chat Message
Action: Game - Text Message
Function: Conversion - Convert Real To String
Function: Unit - Movement Speed

and you have to know for yourself how the unit is assigned to the player to be able to retrieve it out of the player doing the input.
 
First of all you need to set a variable of type "unit" with an array of 12. I call it "Hero" in My triggers.

Then, you need 2triggers :

  • Hero Bought
    • Events
      • Unit - A unit enters taverne region <gen>
    • Conditions
      • ((Triggering unit) is A hero) Equal To*TRUE
    • Actions
      • Set Heros[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
  • ms command
    • Events
      • Player - Player 1 (Red) types a chat message containing -ms as Equivalent Results
      • Player - Player 2 (Blue) types a chat message containing -ms as Equivalent Results
      • Player - Player 3 (Teal) types a chat message containing -ms as Equivalent Results
      • Etc...
      • Make this for the 12players.
    • Conditions
    • Actions
      • Game - Display to (Player group((Triggering player))) the text: (Your actual Movement Speed is : + (String((Current movement speed of Heros[(Player number of (Triggering player))]))))
 
Status
Not open for further replies.
Top