View Full Version : [Support] How to make one entity not attackable until another is destroyed?
I have a ward in place and I do not want it to be destroyed until a tower is.
03-29-2011, 10:26 AM
I would do it like this:
...<applystate .... invulnerable state>
...<expirestate invulnerable state tower>
Guess there are other ways too
03-29-2011, 12:13 PM
In the editor itself, you could look at Caldavar. If it's a pre-placed entity, you can make it dependent on another entity. Look at the scripts for the towers on either side. Tower 2 is invulnerable until Tower 1 dies, and it goes back like that along the way. Using something similar on your pre-placed entities should work with something like that. If it's something you're spawning later, then you'll have to script it how Schmoftie has it.
Yes I want to make it just like towers in caldavar.... the thing is I do not understand how it is done. What I see is only some parameters passed to Target #1...
03-29-2011, 05:36 PM
That's how you do it. The Target #1 and whatnot indicates the tower that determines whether or not the tower is immune or not.
It reads somewhat like this:
If tower X is alive, then tower Y (this tower) is immune.
Just put the name of the tower you want dependency on in the "target" area on the tower you want to be immune.
Does not work.
I have a ward that has to be imune as long as tower is alive.
At ward I put at target#1 the towers name and it does not work. Maybe the behaviour for target#1 is scripted only for towers somwhere?
03-30-2011, 08:36 AM
It may only be scripted for buildings. I know the barracks and main base also inherit immunity by the Target #1. I would then try to do it the way Schmoftie has it. What he has should work just fine.
Make a minuature tower structure with ward vision and no attack?
Its a building so it should behave like a tower, no?