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

[Trigger] Commands.

Status
Not open for further replies.
Level 17
Joined
Apr 13, 2008
Messages
1,608
Go to the Trigger Editor, open it, examine it.
Among the events you should find something like Player entered chat message or whatever.
If entered chat string contains the substring "-ms" then get the unit's movement speed and visualize it on the player's screen ;)
It's not a hard trigger to make at all. You should try to look around in the trigger editor before asking people to make your map for you.
 
here is the movement speed
  • 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
      • Floating Text - Create floating text that reads here is your moveme... above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Change text of (Last created floating text) to (String((Current movement speed of (Triggering unit)))) using font size 10.00
      • Floating Text - Destroy (Last created floating text)
 
Level 3
Joined
Feb 24, 2008
Messages
67
here is the movement speed
  • 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
      • Floating Text - Create floating text that reads here is your moveme... above (Triggering unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Change text of (Last created floating text) to (String((Current movement speed of (Triggering unit)))) using font size 10.00
      • Floating Text - Destroy (Last created floating text)

The actions won't work. The time delay between destroying the floating text and creating it is too short, making it look as if nothing has been done at all.

By the way, cHeRoL, about the attack speed, as there are no function defined for determining attack speed, it might get a little tricky. It needs a lot of calculation and functions, what with other items/abilities that affect attack speed. One of the reasons why you don't see your attack speed displayed in DotA. It's too much of a bother to trigger it.
 
Level 12
Joined
Aug 18, 2006
Messages
1,193
for the attack speed

you could always make a Attack Dummy(not a dummy unit, but a unit that is visible, and has 100000 life with high regen)

order unit to attack Attack Dummy

for every strike on the Attack Dummy, you add +1 to a variable

after 10 seconds(or something, you decide) check THEVARIABLE / The number of seconds it takes for it to check for attack speed
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
String((Current movement speed of (Triggering unit)))
That is conversation real to string unit - movement speed (current).
But I doubt triggering unit will work as the event is not connected with any units.
Two ways to solve that depending if you restrict the command only to one hero per player or to any unit.
1. Put the hero of each player in a hero array and then refer to its current movement speed.
2. Refer to the currently selected unit.
As for attack speed just calculating it can be tricky, as you will have to get all the attack speed you get from items or buffs(that means you will have to check for any of the items or abilities that give ias) then summing them. Generally the formula is simple (base as)/(1+ (Current agility)*(attack speed per point of agility) + (Ias from buffs and items)).
 
Level 3
Joined
Feb 24, 2008
Messages
67
Hmm.. seeing that this is relevant, may I ask how do you remove the zero's after the point like in DotA where the movement speed is displayed in integer form, as opposed to real form, where all the digits after the point came up.

Help would be appreciated.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
edit:spiwn, it picks units current movement speed(you have choise between current/default)
Not sure I follow you as that is what i have posted Unit - Movement Speed (current) as it is in the GUI ;)

Game text is better for this as you will show it only to the person typing, and is more visible.

hmm
Just make it show the current movement speed of the unit that is selected by the player typing the command(checking if there is any unit selected). OR just put the player hero in a variable and refer to its current movement speed.
(this means that instead of selecting the unit by clicking the select unit button in the choose unit window for the current movement speed function, you should use a function like Random Unit from(unit currently selected by player(triggering player)) but you have to check that exactly one unit is selected. OR you could pick every unit that is selected by the player and display all of their movement speeds.

About the zeros - convert from real to integer R2I()
 
Status
Not open for further replies.
Top