On controlling player passage

Cylosis

L1: Registered
Jul 15, 2012
5
1
I've been toying with a few unique map mechanics to stir the proverbial waters of gameplay. I have a few ideas that rely on a room or corridor only allowing one player inside at a time. When they leave, another player can enter.

It's easy enough to have a door close behind them or implement a similar function, but is there a way to make sure that there is only one person present within the boundaries?

Sorry if this seems an odd request
 

henke37

aa
Sep 23, 2011
2,075
515
You mean besides making the area a no build zone? No, still can't be done.

I do not think that this is a good idea anyway.
 

Egan

aa
Feb 14, 2010
1,375
1,721
You can actually make something fitting that description using a filter_activator_name.

filter_activator_name
Name: filter_canAccessRoom
Filter Mode: Disallow entities that match criteria
leave filter name alone

trigger_multiple
Name: namer
Delay before reset: 1
Outputs:
29083897.png


trigger_teleport
Name: RoomDetection
Filter Name: filter_canAccessRoom
Outputs:
29228bbd.png


Put the teleport inside of the multiple like this:
6983f825.png


What this does is when someone touches the outer 'namer' entity, the namer entity disables itself but not before naming the player canAccessRoom. As soon as you touch the teleport trigger it asks if you fit the description of the filter it has been assigned, which is "everything that isn't canAccessRoom", so it doesn't teleport you away. Once inside, if you somehow go away (or die), then the teleport recognizes that OnEndTouch and enables the namer again, but not before naming you Normal, so you can't get back inside.

Edit: Maybe now that I think about it you should put the enable namer output on a delay or put a separate teleport inside this all to lead the person inside away without retriggering the multiple on his way out.

I learned how to use this from this video, by the way:
https://www.youtube.com/watch?v=rbFLnu_wVDA&t=8s
 
Last edited:

Cylosis

L1: Registered
Jul 15, 2012
5
1
You can actually make something fitting that description using a filter_activator_name.
(witchcraft)
I've set this up as you specified as well as toying with ideas from the video, but I still cannot get it to work as intended.

Here is a copy of the test I put together.
https://dl.dropboxusercontent.com/u/19901924/test.rar

Could you take a look and tell me where I went wrong? Thanks again for taking the time to help me out.
 

Egan

aa
Feb 14, 2010
1,375
1,721
Ok, thanks for the file. I went through it and found a few things out. 1: You need a teleport_destination for the trigger_teleport to work. (I've added one in). 2: The trigger_teleport wasn't activating the OnEndTouch because that also only registers for people who meet the filter (and if you're inside it, you do not). So what I ended up doing was creating a second trigger_multiple inside the teleport and moved all the teleport's outputs from that to the 2nd multiple. Oh and also, the filter name on the filter did need to be filled with the value: canAccessRoom

I also made a video covering the changes so you can maybe see it better.

The door version has been done before in a few CounterStrike maps like surf_XIV, where everyone races for the middle, and the first one there gets to choose a minigame surf map for everyone to play. If you were doing the teleport version, keep in mind that everyone would then be teleporting into the same location (people might get stuck inside each other).

Also when you get the file back you can delete the game_text (I was just using them for testing), and also the outputs that affect them. You can also move around and change the name of the teleport_destination, and you might also want to make the areas between each trigger smaller.

Download fixed version
 
Last edited:

Cylosis

L1: Registered
Jul 15, 2012
5
1
Ok, thanks for the file. I went through it and found a few things out.

(Further dark magic)

Download fixed version
Wow, now that's correspondence. Bravo, Egan, for going to these lengths to help me out. My computer is trying to pull itself together after a bluescreen, but I'll go and play around with your designs when we're back in business.

"First to the middle" was one of the ideas I had sketched up for this, a series of points or 'gates' to pass through in a race or obstacle course for jumping. It's disheartening that is isn't as original as I had first thought, but no more discouraging.

I've got three keys from a recent trade, and I'd like you to have them as thanks for being so helpful. I have added you on Steam.