Logic problems.

Discussion in 'Mapping Questions & Discussion' started by Vansiker, Feb 10, 2013.

  1. Vansiker

    Vansiker L1: Registered

    Messages:
    6
    Positive Ratings:
    0
    Hello everyone. I've been enjoying making my own maps and what this community offers for several weeks now. I have run into a problem I cannot seem to work out on my own and am reluctantly asking for help.

    I am trying to make a spycrab chamber that has a door that will close on a button press, but only when a client is inside the chamber. I've made the chamber set a trigger inside and placed the button and door but the logic is confusing me. I'm sure I''m overlooking some simple logic tool that I will slap myself on the head for later.

    I was trying Logic_compare to set the values of the button and trigger inputs but I'm not sure how it compares the values or what the specific input options do. The valve dev community website is vague on the subject and I could use a quick rundown if anyone has the time. Please and Thank you.
     
    Last edited: Feb 10, 2013
  2. Idolon

    aa Idolon the worst admin

    Messages:
    1,421
    Positive Ratings:
    4,154
    Logic_compare doesn't actually need to be used. Set the button to toggle the door's state, then have the trigger disable/enable the button. If the button is disabled, using it won't toggle the door. In other words...

    button Start Disabled

    trigger OnStartTouch button Enable
    trigger OnEndTouchAll button Disable

    button OnPressed door Toggle

    And if you'd like, you can have the door open if nobody is inside the chamber:

    trigger OnEndTouchAll door Open
     
    • Thanks Thanks x 1
  3. Vansiker

    Vansiker L1: Registered

    Messages:
    6
    Positive Ratings:
    0
    Well that was a lot easier than I was making it out to be. I was searching for some sort of and gate logic. Thanks a bunch for the help.
     
  4. Idolon

    aa Idolon the worst admin

    Messages:
    1,421
    Positive Ratings:
    4,154
  5. Vansiker

    Vansiker L1: Registered

    Messages:
    6
    Positive Ratings:
    0
    This worked out really well. I asked the wrong question originally but I figured out what i needed. I set it up with 32 separate chambers with triggers in each one to toggle their individual doors to lock/unlock. All the doors are then set to toggle open and closed by one button that the event leader can press. If a player dies or leaves the doors then lock themselves into the open position.

    I'm now trying to work out a way to auto kill the players when they use the spycrab taunt. After testing various heights I've figured out that the taunt animation doesn't work like crouching, so placing a trigger that activates based on player height doesn't work.

    I am probably going to have to set it up all button based so on a button press the player dies inside the chamber. Or ask them to kill themselves. Research research research.