- Joined
- May 1, 2009
- Messages
- 52
Im attempting to create a passive ability which increases a hero's mana regeneration when their mana is below 200.
i couldnt find a way to detect when a variable stored unit's mana drops below or above 200 so i tried to work around it a bit.
mana regeneration is based on sobi mask, when i set it to a regeneration lower than 10 the game crashes as soon as my hero reaches between 190-200 mana
if i set the mana regeneration to a much higher number the game doesnt crash however instead if i regenerate mana above 200 it will force my mana back down to 200 and then remove the ability.
ex if i regenerate 50 mana per second and have 180 mana, my mana will go to 230 and then back down to 200 before the ability is removed.
i'm really confused by this behavior, if anyone knows a fix to this or just an easyer way to have an event that can detect a variable unit's mana.
i couldnt find a way to detect when a variable stored unit's mana drops below or above 200 so i tried to work around it a bit.
mana regeneration is based on sobi mask, when i set it to a regeneration lower than 10 the game crashes as soon as my hero reaches between 190-200 mana
if i set the mana regeneration to a much higher number the game doesnt crash however instead if i regenerate mana above 200 it will force my mana back down to 200 and then remove the ability.
ex if i regenerate 50 mana per second and have 180 mana, my mana will go to 230 and then back down to 200 before the ability is removed.
i'm really confused by this behavior, if anyone knows a fix to this or just an easyer way to have an event that can detect a variable unit's mana.
-
Sell
-
Events
- Unit - A unit Sells a unit
-
Conditions
- (Unit-type of (Selling unit)) Equal to Forge of Souls
- (Unit-type of (Sold unit)) Equal to Mana Guardian
-
Actions
- Set ManaGuardian = (Sold unit)
- Unit - Move (Sold unit) instantly to Spawn
- Trigger - Add to Mana Regeneration ACT <gen> the event (Unit - (Sold unit)'s mana becomes Less than 200.00)
- Trigger - Add to Mana Regeneration DEACT <gen> the event (Unit - (Sold unit)'s mana becomes Greater than or equal to 200.00)
-
Events
-
Mana Regeneration ACT
- Events
- Conditions
-
Actions
- Unit - Add Mana Regeneration to ManaGuardian
-
Mana Regeneration DEACT
- Events
- Conditions
-
Actions
- Unit - Remove Mana Regeneration from ManaGuardian