Ms??

Chaos_Knight

New Member
Reaction score
39
Okay, ive found another problem.

How do i create a movement speed command??

This does not work(and yes i know, it leaks :( )

Trigger:
  • MS
    • 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
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (This Unit Has + ((String((Current movement speed of (Targeted unit)))) + Movement Speed))
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
Target unit wont work. You will need to save the units into a unit array.
Or use this
Trigger:
  • Movespeed
    • Events
      • 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 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
      • Player - Player 2 (Blue) types a chat message containing -movespeed as An exact match
      • Player - Player 3 (Teal) types a chat message containing -movespeed as An exact match
      • Player - Player 4 (Purple) types a chat message containing -movespeed as An exact match
      • Player - Player 5 (Yellow) types a chat message containing -movespeed as An exact match
      • Player - Player 6 (Orange) types a chat message containing -movespeed as An exact match
      • Player - Player 8 (Pink) types a chat message containing -movespeed as An exact match
      • Player - Player 9 (Gray) types a chat message containing -movespeed as An exact match
      • Player - Player 10 (Light Blue) types a chat message containing -movespeed as An exact match
      • Player - Player 11 (Dark Green) types a chat message containing -movespeed as An exact match
      • Player - Player 12 (Brown) types a chat message containing -movespeed as An exact match
    • Conditions
    • Actions
      • Set UnitGroup = (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True))
      • Unit Group - Pick every unit in UnitGroup and do (Actions)
        • Loop - Actions
          • Game - Display to (Player group((Triggering player))) the text: ((Name of (Picked unit)) + ( movespeed is + (String((Integer((Current movement speed of (Picked unit))))))))
 

Rushhour

New Member
Reaction score
46
instead of Target Unit pick "random unit of units currently selected by triggering player"
 

Whisky

New Member
Reaction score
45
This shows the movementspeed of selected unit for triggering player.

Trigger:
  • MoveSpeed
    • 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
      • [Repeat for other players]
    • Conditions
    • Actions
      • Set TempGroup = (Units currently selected by (Triggering player))
      • Custom script: call DisplayTimedTextToPlayer(GetTriggerPlayer(), 0., 0., 5., "Movement speed of " + GetUnitName(FirstOfGroup(udg_TempGroup)) + ": " + R2S(GetUnitMoveSpeed(FirstOfGroup(udg_TempGroup))))
      • Custom script: call DestroyGroup(udg_TempGroup)


'TempGroup' is a Unit Group variable. If you use a different name, remember to change the 'udg_TempGroup' in the custom scripts.

There doesn't seem to be a GUI action for displaying a message to a single player without using a force, or getting the first unit in a unit group, which is a nuisance.

There is also a free dota template to check stuff like this..
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
Just change those actions to these
Trigger:
  • Actions
    • Set UnitGroup = (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True))
    • Unit Group - Pick every unit in UnitGroup and do (Actions)
      • Loop - Actions
        • Game - Display to (Player group((Triggering player))) the text: ((Name of (Picked unit)) + ( movespeed is + (String((Integer((Current movement speed of (Picked unit))))))))
 

Chaos_Knight

New Member
Reaction score
39
Just change those actions to these
Trigger:
  • Actions
    • Set UnitGroup = (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True))
    • Unit Group - Pick every unit in UnitGroup and do (Actions)
      • Loop - Actions
        • Game - Display to (Player group((Triggering player))) the text: ((Name of (Picked unit)) + ( movespeed is + (String((Integer((Current movement speed of (Picked unit))))))))

Thanks :) +rep

Whiskey, you dont get anything :( that was not help. It was just more difficult. And by the way, i dont wanna copy made things. (Exept Spells).
 

Chaos_Knight

New Member
Reaction score
39
This shows the movementspeed of selected unit for triggering player.

Trigger:
  • Custom Script - call DisplayTimedTextToPlayer(GetTriggerPlayer(), 0., 0., 5., "Movement speed of " + GetUnitName(FirstOfGroup(udg_TempGroup)) + ": " + R2S(GetUnitMoveSpeed(FirstOfGroup(udg_TempGroup))))


There is also a free dota template to check stuff like this..

That custom Script is a lil confusing....
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
:p Lol very much so. I would just use mine and clear the unit group leak.
Trigger:
  • Custom script: call DestroyGroup (udg_UnitGroup)
 

bLu3_eYeS

New Member
Reaction score
31
That custom Script is a lil confusing....

Just copy "call DisplayTimedTextToPlayer(GetTriggerPlayer(), 0., 0., 5., "Movement speed of " + GetUnitName(FirstOfGroup(udg_TempGroup)) + ": " + R2S(GetUnitMoveSpeed(FirstOfGroup(udg_TempGroup))))" and put it in the field at Custom Script :nuts:
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
He means to understand what it does.
I get it displays text to a player containing "movement speed of unit name then the movement speed as an integer.
 

Bogrim

y hello thar
Reaction score
154
Reading the code is the best answer you can get.

A call activates a function.

DisplayTimedTextToPlayer is a function that displays in-game text to the player for a certain amount of time.

The following real values determine the position and time of the text message.

Everything within the quotation is the text message:

FirstOfGroup gets the first unit in the group.

GetUnitName gets the string of the unit name.

R2S means Real to String.

GetUnitMoveSpeed gets the real value of the unit's movement speed.

Most of these are just guesses. Probably accurate. Jass isn't a foreign language, it's just packed as data.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top