Re: How to make things happen when you enter an area and leave
Posted by [RDC]Twitch on Thu Apr 14th at 5:05am 2011

I know how to make the wall come up and go down after 15 seconds but how to make the wall stay u when the player is inside the trigger area? I wan that area to be treated like a zone of protection. While you are in there, the wall comes up and stays up... but when you leave it should come down. What is the bst way to make this happen?
Thanks!

[RDC]Twitch
member
99 posts
52 snarkmarks
Registered: Jun 6th 2009
Location: USA
web
Half-Life, Half-Life 2, and Q3 engine mapping
Re: How to make things happen when you enter an area and leave
Posted by Degenatron on Thu Apr 14th at 1:01pm 2011
I know there is a function specificly for this. I'll see if I can find / remember it.
D-Gen

Degenatron
member
64 posts
73 snarkmarks
Registered: Dec 7th 2004
Location: USA
Occupation: IT Professional
Re: How to make things happen when you enter an area and leave
Posted by [RDC]Twitch on Thu Apr 14th at 1:29pm 2011
Sorry about the screenshot. I didn't consider the size when posting.
When someone is in the zone, I want the wall up and I want to make sure the wall doesn't go down when another player enters the zone.... only want it to go down when there are no players present.

[RDC]Twitch
member
99 posts
52 snarkmarks
Registered: Jun 6th 2009
Location: USA
web
Half-Life, Half-Life 2, and Q3 engine mapping
Re: How to make things happen when you enter an area and leave
Posted by Degenatron on Thu Apr 14th at 2:29pm 2011
I think it's as easy as muking a trigger_multiple point at a func_door.
I think that you'll need to set the function door to have "Delay Before Close" set to 0 and in the flags sceen, make sure "Toggle" is set to 0.
I *THINK* that will do it, but I need to test it when I get home tonight.
D-Gen

Degenatron
member
64 posts
73 snarkmarks
Registered: Dec 7th 2004
Location: USA
Occupation: IT Professional
Re: How to make things happen when you enter an area and leave
Posted by [RDC]Twitch on Thu Apr 14th at 2:59pm 2011
That is the way I initially set it up. trigger multiple to bring up the wall (func_door) and then a delay of 15 seconds for the door to go down. I thought about adding another trigger multiple and placing it at the outer perimeter of the zone so when the player leaves that zone, the wall will then go down.... but that didn't meet the mark because if a player is in the zone and the wall is up... another player could enter the zone and trigger that second trigger multiple on the way in. That would make the dorr go down. I guess if the delay fire time is quick enough, that first trigger multiple will fire again anyhow and maybe the door won't go down?
I will give that a try

[RDC]Twitch
member
99 posts
52 snarkmarks
Registered: Jun 6th 2009
Location: USA
web
Half-Life, Half-Life 2, and Q3 engine mapping
Re: How to make things happen when you enter an area and leave
Posted by Degenatron on Thu Apr 14th at 3:11pm 2011
Hmmm...
I know theses a way to make it act just like you want, but I need to relearn it. I'll work it out tonight and post it up.
D-Gen

Degenatron
member
64 posts
73 snarkmarks
Registered: Dec 7th 2004
Location: USA
Occupation: IT Professional
Re: How to make things happen when you enter an area and leave
Posted by Degenatron on Thu Apr 14th at 3:21pm 2011
Try changing your func_door to a func_plat and setting the toggle flag to 0.
Be sure to configure the plat to move correctly. (You might just want to copy the door and make a new entity for testing so you can keep the door until its figured out)
D-Gen

Degenatron
member
64 posts
73 snarkmarks
Registered: Dec 7th 2004
Location: USA
Occupation: IT Professional
Re: How to make things happen when you enter an area and leave
Posted by Degenatron on Thu Apr 14th at 7:29pm 2011
I dinked around with it at lunch and now have an example map working just like yours does.
Tonight i'll take another run at it. I guess it wasn't as simple as I thought it would be - suprise, suprise.
I'm still looking for a simple answer, but if I can't find one, I think I have a more complex solution that will do the trick.
I'll post it up when I have it.
D-Gen

Degenatron
member
64 posts
73 snarkmarks
Registered: Dec 7th 2004
Location: USA
Occupation: IT Professional
Re: How to make things happen when you enter an area and leave
Posted by [RDC]Twitch on Thu Apr 14th at 10:28pm 2011
I really appreciate the help!

[RDC]Twitch
member
99 posts
52 snarkmarks
Registered: Jun 6th 2009
Location: USA
web
Half-Life, Half-Life 2, and Q3 engine mapping
Re: How to make things happen when you enter an area and leave
Posted by Degenatron on Sat Apr 16th at 7:01pm 2011
Unfortunately, I'm not being much help. I keep running into dead-ends on this. I'm still chewing on it though.
D-Gen

Degenatron
member
64 posts
73 snarkmarks
Registered: Dec 7th 2004
Location: USA
Occupation: IT Professional
Re: How to make things happen when you enter an area and leave
Posted by [RDC]Twitch on Sat Apr 16th at 7:14pm 2011
Thanks D-Gen. I thought about maybe making a func_plat that is shaped like a U so you are in the middle of the U when in the zone but I would rather not have a func_plat under my world brushes and probably one side in the wall.

[RDC]Twitch
member
99 posts
52 snarkmarks
Registered: Jun 6th 2009
Location: USA
web
Half-Life, Half-Life 2, and Q3 engine mapping
Re: How to make things happen when you enter an area and leave
Posted by Degenatron on Sat Apr 16th at 9:24pm 2011
OK, well here is the simplest form I could come up with.

It does not have a "moving shield" but merely a func_wall_toggle that just pops into existance.
Form here, making a moving wall looks like it'll get FAR more complcated.
Here a link to my working file.
Now I've gone back to working on the "Moving" version, and the problem I'm running into is making the stay up or down, depending on the condition. Much like simply putting a tigger_multiple hooked to a func_door, the thing just keeps bouncing up and down. I should have it worked out soon, but I don't think there will be anything simple about it, which is a shame, because it's so intuitive, you'd think there'd already be a fucntion for it.
D-Gen

Degenatron
member
64 posts
73 snarkmarks
Registered: Dec 7th 2004
Location: USA
Occupation: IT Professional
Re: How to make things happen when you enter an area and leave
Posted by [RDC]Twitch on Sat Apr 16th at 10:41pm 2011
Wow, that is genius! I will take a look at the example map tonight and get a better idea. Yeah! You would think it would be easier!

[RDC]Twitch
member
99 posts
52 snarkmarks
Registered: Jun 6th 2009
Location: USA
web
Half-Life, Half-Life 2, and Q3 engine mapping
Re: How to make things happen when you enter an area and leave
Posted by Degenatron on Sun Apr 17th at 8:26am 2011
Genius is a bit much, but thanks.
Still working on the "mover".
Some notes on the "blinker" (the version above):
The "ZoneChecker" loop is needed because game_zone_player isn't always on like a trigger hurt or a touchable button is. It must be activated to check for the player.
The zonechecker loops every 1/2 second, meaning that at most there will be a 1/2 delay for the wall to pop on or off. You can narrow that down by adjusting the "zonechecker" multimanager timings. Zonechecker2 just instantly loops back. Warning: looping too fast can strain the server (on slow servers).
The trigger_auto has a delay of .5 seconds before it starts - this allows for all entities to be spawned in before it runs (in theory - you may want to give it up to a full second or more to be extra safe - make a judgement based on how far away from the nearest spawn point it is vs how tolerant of slow servers you want it to be).
D-Gen

Degenatron
member
64 posts
73 snarkmarks
Registered: Dec 7th 2004
Location: USA
Occupation: IT Professional
Re: How to make things happen when you enter an area and leave
Posted by Orpheus on Sun Apr 17th at 4:46pm 2011
If you guys get the kinks worked out I'd like for you to turn it into a tutorial/article. This may come up again. Just be sure to name it as appropriately as possible so a search will bring it to the fore.

Orpheus
member
13860 posts
1547 snarkmarks
Registered: Aug 26th 2001
Location: Long Oklahoma - USA
Occupation: Long Haul Trucking
The best things in life, aren't things.
Re: How to make things happen when you enter an area and leave
Posted by Degenatron on Sun Apr 17th at 5:35pm 2011
Will do Orph.
D-Gen

Degenatron
member
64 posts
73 snarkmarks
Registered: Dec 7th 2004
Location: USA
Occupation: IT Professional
Re: How to make things happen when you enter an area and leave
Posted by [RDC]Twitch on Sun Apr 17th at 7:08pm 2011
After some testing, the only issue I see so far is that a second player standing where the toggle brush appears will get stuck in it.

[RDC]Twitch
member
99 posts
52 snarkmarks
Registered: Jun 6th 2009
Location: USA
web
Half-Life, Half-Life 2, and Q3 engine mapping
Re: How to make things happen when you enter an area and leave
Posted by Degenatron on Sun Apr 17th at 7:26pm 2011
That can be solved with a trigger_hurt with the same name as the func_wall. Set with a "start off" flag.
D-Gen

Degenatron
member
64 posts
73 snarkmarks
Registered: Dec 7th 2004
Location: USA
Occupation: IT Professional
Re: How to make things happen when you enter an area and leave
Posted by [RDC]Twitch on Mon Apr 18th at 4:09am 2011
I'm not sure what you mean. I need something preventing the player from getting stuck in the toggled brush entity. This stuff is really hard for me to grasp
But I have to start somewhere

[RDC]Twitch
member
99 posts
52 snarkmarks
Registered: Jun 6th 2009
Location: USA
web
Half-Life, Half-Life 2, and Q3 engine mapping