[1] : A Behavior with stacks (max 5 here) which will help to know how many damage to deal.
[2] : A Behavior added to the Unit when born or created (= you can give this behavior immediately in Data Editor) which applies [1] every second (thank to a "Apply Behavior" Effect).
[3] : A Behavior with the flag "Activated on death" which will create a "Search" Effect.
"Search" Effect : Make it so that a small area around the unit will create a "Set" Effect.
"Set" Effect : This effect will create 5 "Damage" Effect. You can add here validators to check the "Unit Type" of the target.
"Damage" Effect : This effect must have a validator to check how many stacks of behavior [1] the Caster or Source unit currently have. Make it so that each "Damage" Effect do as you described.
I have a unit that lasts 5 seconds. If the unit dies after 1 second, it deals say 100 damage. If it explodes after 5 seconds, it deals 500 damage.
Any idea how to create this?
I got this,..
Hello.
You need 3 behaviors.
[1] : A Behavior with stacks (max 5 here) which will help to know how many damage to deal.
[2] : A Behavior added to the Unit when born or created (= you can give this behavior immediately in Data Editor) which applies [1] every second (thank to a "Apply Behavior" Effect).
[3] : A Behavior with the flag "Activated on death" which will create a "Search" Effect.
"Search" Effect : Make it so that a small area around the unit will create a "Set" Effect.
"Set" Effect : This effect will create 5 "Damage" Effect. You can add here validators to check the "Unit Type" of the target.
"Damage" Effect : This effect must have a validator to check how many stacks of behavior [1] the Caster or Source unit currently have. Make it so that each "Damage" Effect do as you described.
And you're done.
Have a nice day !