Hey guys,
I need some help solving this, the idea is that when a Unit wearing a specific kind of boots enters a region, the effect of the Bonus Speed will be doubled. So the boots add 40, but when in [Region], they will add 80.
The trigger looks like this, and currently it's working as intended, but the values are all wrong. In other words, when my hero enters the region AND is wearing the boots, he gains movement speed. When he leaves, he loses some. Except, the values are all wrong. It's not adding 40 like I intend, but 60 for some reason, and when he leaves, it's not removing anything, it's just staying the same.
The way I did this was to create a global variable (call it Real.Movespeed) with initial value of 40, and then when entering region ++ wearing [boots], set myUnit Movement Speed to myUnit.CurrentMovementSpeed + Real.Movespeed. When leaving region ++ wearing boots, set myUnit Movement Speed to myUnit.CurrentMovementSpeed - Real.Movespeed.
I created a quick trigger to return the Movespeed values, and here's what they are:
Default: 270
With Boots: 310
With Boots in region (should be 350): 390
With Boots off region (should be 310 again): 390 still
Entering the Region again just keeps adding 80 movement speed every time. I don't understand why, it's supposed to just add 40.
I need some help solving this, the idea is that when a Unit wearing a specific kind of boots enters a region, the effect of the Bonus Speed will be doubled. So the boots add 40, but when in [Region], they will add 80.
The trigger looks like this, and currently it's working as intended, but the values are all wrong. In other words, when my hero enters the region AND is wearing the boots, he gains movement speed. When he leaves, he loses some. Except, the values are all wrong. It's not adding 40 like I intend, but 60 for some reason, and when he leaves, it's not removing anything, it's just staying the same.
The way I did this was to create a global variable (call it Real.Movespeed) with initial value of 40, and then when entering region ++ wearing [boots], set myUnit Movement Speed to myUnit.CurrentMovementSpeed + Real.Movespeed. When leaving region ++ wearing boots, set myUnit Movement Speed to myUnit.CurrentMovementSpeed - Real.Movespeed.
I created a quick trigger to return the Movespeed values, and here's what they are:
Default: 270
With Boots: 310
With Boots in region (should be 350): 390
With Boots off region (should be 310 again): 390 still
Entering the Region again just keeps adding 80 movement speed every time. I don't understand why, it's supposed to just add 40.