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

Status
Not open for further replies.
Level 19
Joined
Aug 8, 2007
Messages
2,765
Wrong section. If you have a trigger that won't work then post it here else post in the requests section
 
  • Events
    • Unit - A unit gets attacked
  • Conditions
  • Actions
    • Unit - Set (Triggering unit) movement speed to ((Current movement speed of (Triggering unit)) - (0.25 x (Default movement speed of (Triggering unit))))
    • Wait 5.00 seconds
    • Unit - Set (Triggering unit) movement speed to ((Current movement speed of (Triggering unit)) + (0.25 x (Default movement speed of (Triggering unit))))
This would return 25% of speed after 5 seconds again ..

And if you dont wan't unit be slower than 200 for example, add a real comparrison.
 
Level 19
Joined
Mar 18, 2012
Messages
1,716
And it's ineffective plus very bad pratice. One should never suggest such a piece of code.

edit:
Also this is the wrong section for a trigger request. Use World Editor Help Zone instead.

Triggers & Scripts In this forum you may ask for help on fixing a trigger or script. But if you need help getting started with a trigger, this is not the right place — use the World Editor Help Zone.
 
  • Events
    • Unit - A unit gets attacked
  • Conditions
  • Actions
    • Unit - Set (Triggering unit) movement speed to ((Current movement speed of (Triggering unit)) - (0.25 x (Default movement speed of (Triggering unit))))
    • Wait 5.00 seconds
    • Unit - Set (Triggering unit) movement speed to ((Current movement speed of (Triggering unit)) + (0.25 x (Default movement speed of (Triggering unit))))
This would return 25% of speed after 5 seconds again ..

And if you dont wan't unit be slower than 200 for example, add a real comparrison.

This trigger is MUI. He is right about triggering unit and dying unit being MUI. They are treated as local variables.
This is also a bad way of doing it.
 
Status
Not open for further replies.
Top