I'm making an ability that summons a unit for 30 seconds. If the unit is still alive after 30 seconds it dies. What is the best way to do this?
I can give the unit a behavior buff with a duration of 30 seconds which will do 100% of their health at the end. I could give the unit a dumby ability with a 30 second initial cool down to show the user how long the unit has to live. Is this the best method? Warcraft 3 Had that big bar on the unit UI to show life left. Is that available in sc2?
A behavior with a 30 second duration may be the better choice, i believe with the "countdown" box checked in buff flags will show a grey bar under their health with the time left.
You will want a behavior with a 30 second duration, with an expire effect of suicide. Suicide is a damage effect that has the Kill flag set (it will kill the targeted unit, in nearly all circumstances).
I'm making an ability that summons a unit for 30 seconds. If the unit is still alive after 30 seconds it dies. What is the best way to do this?
I can give the unit a behavior buff with a duration of 30 seconds which will do 100% of their health at the end. I could give the unit a dumby ability with a 30 second initial cool down to show the user how long the unit has to live. Is this the best method? Warcraft 3 Had that big bar on the unit UI to show life left. Is that available in sc2?
A behavior with a 30 second duration may be the better choice, i believe with the "countdown" box checked in buff flags will show a grey bar under their health with the time left.
@merrillphish: Go
You will want a behavior with a 30 second duration, with an expire effect of suicide. Suicide is a damage effect that has the Kill flag set (it will kill the targeted unit, in nearly all circumstances).
Thanks guys! That work now I need to figure out how to visualize the countdown timer bar. Im gonna look at the zerg infested terrain ability.
So the Behavior buff needs to be based off of "Timed Life" then you set the display field. Thanks guys!