I'm trying to make a buff that increases the caster's damage that lasts for either up to 10 seconds, or for 1 attack, whichever comes first. I got everything working, from the bonus damage to the animations, but I still can't figure out how to make it last for only 1 attack.
Basically, what I need is for the behavior 'Buff X' to be removed after the affected unit (The caster, in this case) attacks once.
I tried changing the 'Behaviours - Validators (Remove)' field, using both 'Caster not Attacking' and 'NotAttacking' validators, but doing so would remove the buff once the attack starts, hence depriving the attack of the bonuses (the damage for instance) from the buff.
Create a "Remove behavior" effect, set the behavior, and set it to caster.
Create a "set" effect. Add the remove behavior and the regular attack effect for your unit
Go to your weapon, switch out the usual effect with the set effect.
Repeat for each unit that can be affected by the buff. Only way i can think off right now :/ Unless you want to use triggers, which might cause lag because of the "unit is attacked event". Make a condition to check whether the behavior is on the unit, then remove it.
I'm trying to make a buff that increases the caster's damage that lasts for either up to 10 seconds, or for 1 attack, whichever comes first. I got everything working, from the bonus damage to the animations, but I still can't figure out how to make it last for only 1 attack.
Basically, what I need is for the behavior 'Buff X' to be removed after the affected unit (The caster, in this case) attacks once.
I tried changing the 'Behaviours - Validators (Remove)' field, using both 'Caster not Attacking' and 'NotAttacking' validators, but doing so would remove the buff once the attack starts, hence depriving the attack of the bonuses (the damage for instance) from the buff.
Create a "Remove behavior" effect, set the behavior, and set it to caster.
Create a "set" effect. Add the remove behavior and the regular attack effect for your unit
Go to your weapon, switch out the usual effect with the set effect.
Repeat for each unit that can be affected by the buff. Only way i can think off right now :/ Unless you want to use triggers, which might cause lag because of the "unit is attacked event". Make a condition to check whether the behavior is on the unit, then remove it.
@TheAlmaity: Thanks, it worked perfectly.