Warcraft III resources & community, 2003–2006 · archived

Is there a way to save the life of something?

5 posts
#1

Is there a way to save the life of something?

Like a gate for example. In one of my maps, i have some gates in it that the other team needs to destroy to win, but the team that controls them can just open and close them, and thus, healing them. I am hoping to be able to save the life of the gate as it gets damaged and if its closed again, it sets it back to what it was at before. I thought that maybe some variables and some tricky triggering would be able to do it, but I havnt figured it out yet. I dont even know if its possible :(
#2
Just use the doodad action triggers and reset the life of the gate when you trigger it to close.

Actions:
Destructable- set life
Destructable- Open/close gate
#3

I already knew that, what I meant was...

How do I set the life of the gate as its attacked to a variable, so that when its closed again, it will set it to that variable.
#4
Make a variable with the type: integer.

Before u open the gate, do: set 'the variable' is the life of 'the gate'

whe u close it again, do: wait 0.01 seconds and then set the life of 'the gate' to 'the variable'
#5

thanks

Thanks alot, it worked :D
I really feel stupid that I didn't think of that, but what can you do, lol

Thanks again ^_^
I really appreciate it!!