maldruzard
Member
- Reaction score
- 2
Hey there!
I'm trying to make a good ol' "tired" effect for units when they get under a certain amount of mana. The way I currently am doing this is by having a periodic event track unit mana and any less than or equal to 100 mana have their movement speed set to a lower number, and when they go above that point of mana, another periodic trigger reverts their movement speed to normal.
This is the trigger:
Events
Time - Every 0.10 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Mana of (Picked unit)) Less than or equal to 99.00
(Unit-type of (Picked unit)) Equal to Survivor
Then - Actions
Unit - Set (Picked unit) movement speed to 150.00
The other trigger is the same, but obviously the with the movement speed and mana values at different numbers. However, I'm not sure if this is the best way to do this. Though the triggers work well enough, I want a dummy to be spawned and cast 'slow' on the unit when under 100 mana, just for the visual effect and buff to explain why the unit is slower. Because of this, I do not think adding a spawn dummy to this trigger would work, due to the overwhelmingly large amount of dummies that would be spawned and destroyed.
Is it at all possible to use a unit's mana dropping below a certain point as an event so I do not have to use periodic time-based events?
Cheers!
I'm trying to make a good ol' "tired" effect for units when they get under a certain amount of mana. The way I currently am doing this is by having a periodic event track unit mana and any less than or equal to 100 mana have their movement speed set to a lower number, and when they go above that point of mana, another periodic trigger reverts their movement speed to normal.
This is the trigger:
Events
Time - Every 0.10 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Mana of (Picked unit)) Less than or equal to 99.00
(Unit-type of (Picked unit)) Equal to Survivor
Then - Actions
Unit - Set (Picked unit) movement speed to 150.00
The other trigger is the same, but obviously the with the movement speed and mana values at different numbers. However, I'm not sure if this is the best way to do this. Though the triggers work well enough, I want a dummy to be spawned and cast 'slow' on the unit when under 100 mana, just for the visual effect and buff to explain why the unit is slower. Because of this, I do not think adding a spawn dummy to this trigger would work, due to the overwhelmingly large amount of dummies that would be spawned and destroyed.
Is it at all possible to use a unit's mana dropping below a certain point as an event so I do not have to use periodic time-based events?
Cheers!