- Joined
- Jul 31, 2008
- Messages
- 477
How can you make a -ms (movespeed) command like the one in DotA?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Events
Unit - A unit owned by player 1 (red) begins casting an abilty
Conditions
((Casting unit) is A Hero) Equal to True
Actions
Set MoveSpeed = (Casting unit)
ShowMovementspeed

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

Conditions

Actions


Set UnitGroup = (Units owned by (Triggering player))


Unit Group - Pick every unit in UnitGroup and do (Actions)



Loop - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






((Picked unit) is selected by (Triggering player)) Equal to True





Then - Actions






Set MovespeedCheckUnit = (Picked unit)





Else - Actions


Custom script: call DestroyGroup(udg_UnitGroup)


Set PlayerGroup = (Player group((Triggering player)))


Game - Display to PlayerGroup for 10.00 seconds the text: (|cffffcc00Your current selected units movementspeed|r: + (String((Integer((Current movement speed of MovespeedCheckUnit))))))


Custom script: call DestroyForce(udg_PlayerGroup)


Set MovespeedCheckUnit = No unit
Well, this trigger may help you. When a player writes: "-ms" a message will appear for that player and show the current movementspeed of the units the player is current selecting.
This trigger requires 1 variable:
- 1 Unit Group Variable.
ShowMovementspeed
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
Conditions
Actions
Set UnitGroup = (Units owned by (Triggering player) matching (Matching unit) is selected by (Triggering player))
Unit Group - Pick every unit in UnitGroup and do (Actions)
Loop - Actions
Game - Display to (Triggering player) for 10.00 seconds the text: (|cffffcc00Movementspeed|r of + (Name of (Picked Unit)): + (String((Integer((Current movement speed of MovespeedCheckUnit))))))