Logic problems.

  • If you're asking a question make sure to set the thread type to be a question!

Vansiker

L1: Registered
Feb 10, 2013
6
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:

Idolon

they/them
aa
Feb 7, 2008
2,105
6,106
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
 

Vansiker

L1: Registered
Feb 10, 2013
6
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.
 

Vansiker

L1: Registered
Feb 10, 2013
6
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.