HELP PLEASE! Triggers for opening gates with levers

Discussion in 'World Editor Help' started by Euskaltano, Feb 14, 2018.

  1. Euskaltano

    Euskaltano Member

    +0 / 0 / -0
    Hi everyone! Thanks in advance for your help!

    I have a gate on a fortress, and inside the fortress I have two levers. On one lever I have a trigger that when the lever dies, the gate will open and the lever will resurrect. The other lever closes the gate. This system works just fine, and I can open and close the gate using the levers with no problem.

    The problem is that if another player destroys my gate, all I have to do is hit one of the levers again and it resurrects my gate. I can't figure out how to make this not happen.
    I've tried making a condition where the lever checks to see if the gate is alive first before opening and closing it, and I've also tried setting a trigger where when the gate is destroyed, it also removes the levers. But both of these triggers mess up my original triggers for some strange reason. They make it so that once I hit the levers to open or close the gate, the levers no longer resurrect. I don't know how to fix it.

    I've attached pictures of my triggers.

    Thanks so much for your help! asdfasd.PNG
  2. Azureus

    Azureus New Member

    +0 / 0 / -0
    So if you want levers to be only functional while the gate exists you could do: remake triggers to account for 'dead' destructible or just simply make a variable with a trigger which goes like this
    Event - Destructible destroyed
    Condition - Destroyed obj is your gate
    Action - set gateDead = true
    Then you check if gate is dead in the lever open trigger or wherever
  3. jonas

    jonas Member

    +42 / 4 / -0
    This won't work because the gate is destroyed by opening it, so you would never be able to close your gates.
    There is another problem: you can open and close the gates quickly to heal them back to 100%.

    I think you need to do two things:
    1) remember the health of a gate when it is opened via lever, and restore it when closing it with the lever
    2) have a second trigger that fires when the gate is destroyed, and which first disables the lever triggers, then destroys the lever. Disable this trigger before you open the gate with the lever, and enable it again when the gate is opened.

Share This Page