I´m trying to create a temporary invulnerable buff.
Created an behavior buff.
In (modification +) and behavior
behavior categories enabled - temporary
state flags - invulnerable
Stats:Duration = 3 (I want it to last only 3 sec)
Stats:Maximum stack count = 1
I´m using the trigger action add behavior (player) to add to the created units in the trigger.
The result so far is that the trigger creates the units and adds the temp invulnerable buff and the buff does its effect except one thing.
It seems to never wear off. Thought stats:duration was for that.
Anyone have any idea what I should do to wear off after 3 sec and never apply again on the same unit?
I bet its a simple problem. Im just to inexperienced to understand what can be wrong :P
What you currently do, is that you add a 3 second duration behavior, which enables a different behavior (which lasts forever). The game is never told to disable that other behavior again.
You'll need to either put a duration at the behavior you add with your behavior, make an expire effect which removes the invulnerability behavior, or make the behavior you add, the one that gives invulnerability.
What I did was to create an effect that removes behavior and point it to remove my "temp invulnerable" behavior and simply linked that effect to the "temp invulnerable"s "expire effect" and now it works wonderfull!
Thanks!
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hello! Hope someone can help me.
I´m trying to create a temporary invulnerable buff.
Created an behavior buff.
In (modification +) and behavior behavior categories enabled - temporary state flags - invulnerable
Stats:Duration = 3 (I want it to last only 3 sec) Stats:Maximum stack count = 1
I´m using the trigger action add behavior (player) to add to the created units in the trigger.
The result so far is that the trigger creates the units and adds the temp invulnerable buff and the buff does its effect except one thing. It seems to never wear off. Thought stats:duration was for that.
Anyone have any idea what I should do to wear off after 3 sec and never apply again on the same unit? I bet its a simple problem. Im just to inexperienced to understand what can be wrong :P
What you currently do, is that you add a 3 second duration behavior, which enables a different behavior (which lasts forever). The game is never told to disable that other behavior again.
You'll need to either put a duration at the behavior you add with your behavior, make an expire effect which removes the invulnerability behavior, or make the behavior you add, the one that gives invulnerability.
Thank you ScorpSCII !
I manage to fix it thanks to you.
What I did was to create an effect that removes behavior and point it to remove my "temp invulnerable" behavior and simply linked that effect to the "temp invulnerable"s "expire effect" and now it works wonderfull!
Thanks!