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

-ms command

Status
Not open for further replies.
Level 12
Joined
Mar 23, 2008
Messages
942
You don't need to save the movespeed to a variable.

I don't know how is your map, but you can use the selected unit to check the ms.
But more information about your map is needed to make a better trigger.
 
Level 22
Joined
Jun 24, 2008
Messages
3,050
Umm.. No?

That would set 'MoveSpeed' to be a unit, when hes casting any ability.

Do like this
Events
A unit is ordered an order targeting an object
A unit is ordered an order targeting nothing
A unit is ordered an order targeting a location
Conditions
Actions
Set MovingUnit[Player number of (triggering player) = Triggering unit

Then make another trigger

Events
Player 1 types -Movespeed
Conditions
Actions
Game - Message blablabla (Movespeed of (MovingUnit[Player number of (triggering player)].
 
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 unit the player is current selecting.

This trigger requires 3 variables:

- 1 Unit Group Variable.
- 1 Player Group Variable.
- 1 Unit 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))
      • 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
 
Level 12
Joined
Mar 23, 2008
Messages
942
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))))))

Edited it, I think that way is better for him.
 
Status
Not open for further replies.
Top