Shadow
TH.net Regular
- Reaction score
- 23
okay so im trying to make a gate system with destructibles where this unit called the gate keeper has the ability to open the gate an ability to close the gate. So what I do is when the unit casts open gate a real variable is set to the current health of the gate destructible, then the destructible opens. Then when the unit casts close gate it closes the gate and sets the health of the destructible to the Real Var.
Now this works all grand and fine, my issue is when real var is below 0 (destructible is killed) to remove the abilities from the unit but it seems that i have to cast open gate again and then the gate opens and the ability is removed I tried to add another action under where it removes the ability to kill the gate but it didn't work so everything works its just I have to cast open gate then the gate opens which I Don't want so somehow I need a check to see if the destructible health is below 10 to remove the ability and kill the destructible.
I tried this but it didnt suceed
Made it 20 because I thought it would make it so the ability would be removed before the gate was dead so it would fix my problem where you could still cast the ability.
So my whole thing works its just the gate always needs to be opened so the ability is removed v.v
Now this works all grand and fine, my issue is when real var is below 0 (destructible is killed) to remove the abilities from the unit but it seems that i have to cast open gate again and then the gate opens and the ability is removed I tried to add another action under where it removes the ability to kill the gate but it didn't work so everything works its just I have to cast open gate then the gate opens which I Don't want so somehow I need a check to see if the destructible health is below 10 to remove the ability and kill the destructible.
I tried this but it didnt suceed
Trigger:
- Remove Gate Abilities
- Events
- Time - Every 1.00 seconds of game time
- Conditions
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Gate1 Greater than or equal to 10.00
- Then - Actions
- Set Gate1 = (Current life of (Iron Gate 0012))
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events
Trigger:
- Gate is Dead
- Events
- Game - Gate1 becomes Less than 20.00
- Conditions
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Gate1 Less than 20.00
- Then - Actions
- Unit - Remove Open Gate 1 from Base Captain 0451 <gen>
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events
Made it 20 because I thought it would make it so the ability would be removed before the gate was dead so it would fix my problem where you could still cast the ability.
So my whole thing works its just the gate always needs to be opened so the ability is removed v.v