Well, inspiration ended, so here's my problem. I need to create an ability, which is not controllable by player (it doesn't have a command card button), but it activates when units Energy reaches zero. Currently, I have a validator for Autocast, which checks if Energy% == 0, then I have the ability with autocast flag on, autocast initially on flag on. The validator is tied to autocast filter. Still, the ability doesn't trigger. I'd like to hear an elegant solution, without periodic behaviours or triggering.
Check the "transient" flag for the ability, include "self"/"caster" in the autocast filter and make it of type Effect-Instant. At least that should work.
Or you could use a Behavior with the Energy%==0 validator in the Deactivate field, which will shut it down if energy isn't 0. You'll still need a periodic effect to achieve anything beyond the capacity of a behavior though.
Alternatively you could use the Remove field and add the intended effect under Effect-Final. This would require a secondary setup to restore the behavior after triggering, though that could be included in the Effect-Final chain. (also might require a CasterNotDead validator as Effect-Final also triggers if the host dies)
Edit: Transient and Transient Preferred are on. The autocast filters didn't change anything. I'm going to do the behavior -> effect -> behavior chain later today if I won't figure out a simplier way...
might want to change it to LT5 energy... reason being if it has energy then it most likey has energy regenerate, so even if the unit does actually hit 0 the regenerate will kick in to make it 1 causeing it problems and not fire. then just to make sure check to see if its interruptable. that could also get it to not fire as well. dont use a percentage use a number that it should be less than or equal to for it to fire.
Hello, fellow mappers, I'm in dire need of help.
Well, inspiration ended, so here's my problem. I need to create an ability, which is not controllable by player (it doesn't have a command card button), but it activates when units Energy reaches zero. Currently, I have a validator for Autocast, which checks if Energy% == 0, then I have the ability with autocast flag on, autocast initially on flag on. The validator is tied to autocast filter. Still, the ability doesn't trigger. I'd like to hear an elegant solution, without periodic behaviours or triggering.
Thanks,
Dwarfius.
Check the "transient" flag for the ability, include "self"/"caster" in the autocast filter and make it of type Effect-Instant. At least that should work.
Or you could use a Behavior with the Energy%==0 validator in the Deactivate field, which will shut it down if energy isn't 0. You'll still need a periodic effect to achieve anything beyond the capacity of a behavior though.
Alternatively you could use the Remove field and add the intended effect under Effect-Final. This would require a secondary setup to restore the behavior after triggering, though that could be included in the Effect-Final chain. (also might require a CasterNotDead validator as Effect-Final also triggers if the host dies)
Thanks, will try it out now :)
Edit: Transient and Transient Preferred are on. The autocast filters didn't change anything. I'm going to do the behavior -> effect -> behavior chain later today if I won't figure out a simplier way...
Bump, still want to do it with a simple autocast :(
@o3210: Go
might want to change it to LT5 energy... reason being if it has energy then it most likey has energy regenerate, so even if the unit does actually hit 0 the regenerate will kick in to make it 1 causeing it problems and not fire. then just to make sure check to see if its interruptable. that could also get it to not fire as well. dont use a percentage use a number that it should be less than or equal to for it to fire.
Didn't help... Well, it seems it'll be done with a workaround... Thanks for advices, guys.