• 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.
  • It's time for the first HD Modeling Contest of 2025. Join the theme discussion for Hive's HD Modeling Contest #7! Click here to post your idea!

Movement Speed (-ms)

Status
Not open for further replies.
Level 9
Joined
Apr 23, 2011
Messages
527
i think he meant a command that could be used to show your movement speed.
yes, you can using the show message command in the Game category. i'm not sure what specifically since i can't go into world editor right now.
 
Level 18
Joined
May 11, 2012
Messages
2,103
Events:
Player () types a chat message containing -ms
Player () types a chat message containing -movespeed

Actions:
Set TempPlayerGroup = Player Group (Triggering Player)
Custom Script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units Owned by (Triggering Player) matching ((Matching unit is a Hero) equal to (True)) and do actions:
Game - Display message to TempPlayerGroup the message: (String(Movement speed of (Picked Unit))
Custom Script: call DestroyForce(udg_TempPlayerGroup)

I wrote this from memory so...
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,220
In DotA you only control one unit though. So shouldn't it display the movement speed of a certain unit? Maybe the currently selected one.

Since I was too lazy to create two triggers I merged them. I had to use a custom script.

  • Melee Initialization
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 1 (Red) types a chat message containing -ms as An exact match
      • Player - Player 1 (Red) types a chat message containing -movementspeed as An exact match
    • Conditions
    • Actions
      • Custom script: if GetTriggerEventId() == ConvertPlayerUnitEvent(24) then
      • Set selected_unit = (Triggering unit)
      • Custom script: else
      • Game - Display to (Player group((Triggering player))) the text: (String((Current movement speed of selected_unit)))
      • Custom script: endif
 
Level 24
Joined
Aug 1, 2013
Messages
4,658
I am sure that in every decent AoS/MOBA map, you have a unit array that contains the heroes of each player with the player number as index.

So the trigger would be like this:
  • Untitled Trigger 004
    • Events
      • Player - Player 1 (Red) types a chat message containing -ms as An exact match
      • Player - Player 1 (Red) types a chat message containing -movementspeed as An exact match
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (Movement speed = + (String((Current movement speed of Heroes[(Player number of (Triggering player))]))))
(With the events for every player.)

The current selected unit can also be a summoned unit though... I assume.
I never played the original DotA so Idk about selections.
But I would have made it (and I am making it) that if you have selected an enemy, it will display it's data in a multiboard and you will instantly select your hero again.
When you have selected your own units, you just have those (includes summoned units etc).
 
Level 25
Joined
May 11, 2007
Messages
4,650
In Dota you can control multiple units, for example Meepoo, Illusions, summons or mind-controlled creeps.

  • chat movement
    • Events
      • Player - Player 1 (Red) types a chat message containing -ms as An exact match
      • Player - Player 2 (Blue) types a chat message containing -ms as An exact match
      • Player - Player 3 (Teal) types a chat message containing -ms as An exact match
      • Player - Player 4 (Purple) types a chat message containing -ms as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -ms as An exact match
      • Player - Player 6 (Orange) types a chat message containing -ms as An exact match
      • Player - Player 7 (Green) types a chat message containing -ms as An exact match
      • Player - Player 8 (Pink) types a chat message containing -ms as An exact match
      • Player - Player 9 (Gray) types a chat message containing -ms as An exact match
      • Player - Player 10 (Light Blue) types a chat message containing -ms as An exact match
      • Player - Player 11 (Dark Green) types a chat message containing -ms as An exact match
      • Player - Player 12 (Brown) types a chat message containing -ms as An exact match
    • Conditions
    • Actions
      • Set tempGroup = (Units currently selected by (Triggering player))
      • Unit Group - Pick every unit in tempGroup and do (Actions)
        • Loop - Actions
          • Set ChatString = (((Name of (Picked unit)) + speed: ) + (String((Integer((Current movement speed of (Picked unit)))))))
          • Game - Display to (Player group((Triggering player))) the text: ChatString
      • Custom script: call DestroyGroup(udg_tempGroup)
 
Level 11
Joined
Jan 23, 2015
Messages
788
Just make variable with arrays number the number of players and every time a player chooses a hero store the hero in the variable with index Number of (Owner of Hero). You will need this not only for the -ms command, but for many other things. Make this trigger for the command:
Event:
Player 1 (Red) types a chat message containing -ms as An exact match.
Player 1 (Red) types a chat message containing -movespeed as An exact match.
Condition:
(Number of units (Owned by Triggering Player) of type Hero) equal to 1
Action:
Game - Display to (Player group((Triggering player))) the text: Current movespeed of (Name of Hero[Number of Triggering Player] + is + String((Integer((Current movement speed of Hero[Number of Triggering Player]))))
 
Level 25
Joined
May 11, 2007
Messages
4,650
Just make variable with arrays number the number of players and every time a player chooses a hero store the hero in the variable with index Number of (Owner of Hero). You will need this not only for the -ms command, but for many other things. Make this trigger for the command:
Event:
Player 1 (Red) types a chat message containing -ms as An exact match.
Player 1 (Red) types a chat message containing -movespeed as An exact match.
Condition:
(Number of units (Owned by Triggering Player) of type Hero) equal to 1
Action:
Game - Display to (Player group((Triggering player))) the text: Current movespeed of (Name of Hero[Number of Triggering Player] + is + String((Integer((Current movement speed of Hero[Number of Triggering Player]))))
But that doesn't work as he wants movement speed of all units selected..

@Chaosy, here:
  • chat movement
    • Events
      • Player - Player 1 (Red) types a chat message containing -ms as An exact match
      • Player - Player 2 (Blue) types a chat message containing -ms as An exact match
      • Player - Player 3 (Teal) types a chat message containing -ms as An exact match
      • Player - Player 4 (Purple) types a chat message containing -ms as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -ms as An exact match
      • Player - Player 6 (Orange) types a chat message containing -ms as An exact match
      • Player - Player 7 (Green) types a chat message containing -ms as An exact match
      • Player - Player 8 (Pink) types a chat message containing -ms as An exact match
      • Player - Player 9 (Gray) types a chat message containing -ms as An exact match
      • Player - Player 10 (Light Blue) types a chat message containing -ms as An exact match
      • Player - Player 11 (Dark Green) types a chat message containing -ms as An exact match
      • Player - Player 12 (Brown) types a chat message containing -ms as An exact match
    • Conditions
    • Actions
      • Set tempGroup = (Units currently selected by (Triggering player))
      • Unit Group - Pick every unit in tempGroup and do (Actions)
        • Loop - Actions
          • Set ChatString = (((ChatString + (Name of (Picked unit))) + : ) + (String((Integer((Current movement speed of (Picked unit)))))))
          • Set ChatString = (ChatString + )
      • Game - Display to (Player group((Triggering player))) the text: ChatString
      • Custom script: call DestroyGroup(udg_tempGroup)
 

Attachments

  • MaievsBarrow.w3x
    122.4 KB · Views: 40
Status
Not open for further replies.
Top