Set movement speed by triggers, how does this stack with bonuses?

MP®

Member
Reaction score
11
I'm wondering how setting movement speed by triggers works exactly.

Because there are lots of ways that movement speed can change during the game, for example by item bonuses, abilities, upgrades etc.

If you set the movement speed of a unit to 10% more than its default movement speed, does this overrule other bonuses? So for example:

Unit has boots of speed with 20% move bonus. Then a trigger sets movement speed of unit to 110% of default movement speed.

Has the unit at that point 110% of default + 20% bonus (I hope so) or 110%? Or even otherwise?


I also have multiple abilities with triggered movement speed bonus or decrease (temporary, until spell duration is over, or ability is deactivated). How can I make these things work together? Or should I give them item movement speed bonus instead? Because now it doesn't work together.. (when 1 unit is in 'defend' mode (with decreased move speed) and then uses the sprint ability (with move bonus) its move speed gets even LESS (very strange btw)

The unit gets its movespeed decrease by defend in the object editor, while I give it a bonus by triggering
Trigger:
  • Unit - Set (Triggering unit) movement speed to ((Current movement speed of (Triggering unit)) x (1.10 + ((Real((Level of Sprint for (Triggering unit)))) / 20.00)))



BTW maybe I'm making it too hard for myself anyway: is there any ability that has move speed bonus with instant cast (target self) which is NOT berserk (because I'm already using that one)? And the ability should be cast without making the unit stop (so while moving the ability should be able to cast - like berserk, but that's why I used berserk already for another triggered ability).

Which abilities do not make units stop moving anyway? I know also windwalk doesn't, and this also has movement speed bonus, but also invisibility.. How can I remove this invisibility effect?
 

NotInTheFace

Member
Reaction score
17
I know also windwalk doesn't, and this also has movement speed bonus, but also invisibility.. How can I remove this invisibility effect?

You can set the fade time to -1 (hold shift+enter) to remove invisibility. It still has other side effects though (Like being able to walk through other units).
 

Inflicted

Currently inactive
Reaction score
63
At the above post, I doubt it. But test it.

And I think that when setting the movement speed, it will apply the bonuses after the change.

For example, default movement speed is 300.
Picks up Boots of Speed +50 m/s (Total is set to 350)
Now you want to set it to 400.
You should take the inital amount and add the bonus, rather than take the current amount as it will add the boots speed twice.
You may want to keep track of the movement speed bonuses in variable arrays or a hashtable, depending on the usage.
 

MP®

Member
Reaction score
11
At the above post, I doubt it. But test it.

And I think that when setting the movement speed, it will apply the bonuses after the change.

For example, default movement speed is 300.
Picks up Boots of Speed +50 m/s (Total is set to 350)
Now you want to set it to 400.
You should take the inital amount and add the bonus, rather than take the current amount as it will add the boots speed twice.
You may want to keep track of the movement speed bonuses in variable arrays or a hashtable, depending on the usage.

hmm yeah well I know one thing now: its way easier to just give them the item movement speed bonus ;)

thnx
 

MP®

Member
Reaction score
11
Is there another ability that I can give to a hero that already has the Item Move Speed Bonus, to make both abilities stack with eachother?
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top