My single Hero Respawn Trigger uses local variables to store the dying hero and other information I need referenced.
I need it referenced because I'm using "Wait" (Hero Death Timer Seconds) before I revive the hero. Each hero has their own death timer stored in the single array so the wait timer is modified the more times you die. (Every time you die, it takes 5 more seconds to respawn).
I'd like to create a "Buy Back" ability that eliminates the "Wait" but I don't think that's possible. I need another solution.
I thought of possibly using a "While Loop" possibly. One thing I DON'T want to do is the whole, "Prevent Hero from dying" business. I've read alot about that, I don't think my map requires that system.
I feel like you're using too many triggers for this, but I also can't give a very good explanation of a better way to do it so...
One way to do a buy back, would be to make an upgrade ability that has an upgrade effect that modifies a units stats, then you should be able to set the death timer to 0. If you can't do that, you could also have a trigger look for when a unit uses the upgrade ability and set the timer equal 0 through that.
It's only a single trigger for all heros. How is that too many triggers? It's very simple.
When unit dies, store dead hero, respawn dead hero in 15 seconds or whatever. 1 Trigger works for all.
I simply need a method for stopping the wait timer. The "Wait" function actually pauses a trigger before continuing with the actions. There is no function that I know of that can interrupt this "wait" action. Break can interrupt a While Loop. So maybe there is a possibility to use while loops or something with the break function. But you would still have a delay because you would need to use "wait" actions.
What in triggers is there besides "wait" actions that spawn the new hero at the appropriate time.
You mention using DATA and upgrade effects to modify the unit stats. Not sure what you mean by this unless you're talking about using a behavior on a unit, lets call it "Dead Hero" or incapacitated. Then hide the unit on the map, and when the duration for the behavior ends revive the hero and move it to its respawn point.
Yeah I'm not into the whole "Prevent Hero from dying" thing. I don't need it because I don't use inventories.
Maybe there is another way using DATA.
EDIT: I don't think if you modified the death timer, and set it to 0 while a "Wait" action is taking place that it would actually interupt the wait action taking place. I could be wrong on this.
My single Hero Respawn Trigger uses local variables to store the dying hero and other information I need referenced.
I need it referenced because I'm using "Wait" (Hero Death Timer Seconds) before I revive the hero. Each hero has their own death timer stored in the single array so the wait timer is modified the more times you die. (Every time you die, it takes 5 more seconds to respawn).
I'd like to create a "Buy Back" ability that eliminates the "Wait" but I don't think that's possible. I need another solution.
I thought of possibly using a "While Loop" possibly. One thing I DON'T want to do is the whole, "Prevent Hero from dying" business. I've read alot about that, I don't think my map requires that system.
@onlyleviathan: Go
I feel like you're using too many triggers for this, but I also can't give a very good explanation of a better way to do it so...
One way to do a buy back, would be to make an upgrade ability that has an upgrade effect that modifies a units stats, then you should be able to set the death timer to 0. If you can't do that, you could also have a trigger look for when a unit uses the upgrade ability and set the timer equal 0 through that.
New to the Editor? Need a tutorial? Click Here
Want data assets? Click Here
@fishy77: Go
It's only a single trigger for all heros. How is that too many triggers? It's very simple.
When unit dies, store dead hero, respawn dead hero in 15 seconds or whatever. 1 Trigger works for all.
I simply need a method for stopping the wait timer. The "Wait" function actually pauses a trigger before continuing with the actions. There is no function that I know of that can interrupt this "wait" action. Break can interrupt a While Loop. So maybe there is a possibility to use while loops or something with the break function. But you would still have a delay because you would need to use "wait" actions.
What in triggers is there besides "wait" actions that spawn the new hero at the appropriate time.
You mention using DATA and upgrade effects to modify the unit stats. Not sure what you mean by this unless you're talking about using a behavior on a unit, lets call it "Dead Hero" or incapacitated. Then hide the unit on the map, and when the duration for the behavior ends revive the hero and move it to its respawn point.
Yeah I'm not into the whole "Prevent Hero from dying" thing. I don't need it because I don't use inventories.
Maybe there is another way using DATA.
EDIT: I don't think if you modified the death timer, and set it to 0 while a "Wait" action is taking place that it would actually interupt the wait action taking place. I could be wrong on this.
T
Use a global real variable for the time to respawn while dead,
Then when they click to buy back their hero set the respawn timer to 0.0.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
@willuwontu: Go
Awesome! That solution will work perfectly. Thank you!