Areaportal opened and closed with trigger_multiple!

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
Phantomwarrior
Corporal
Posts: 27
Joined: Fri Jan 20, 2006 1:42 am
Location: Bakersfield, California

Areaportal opened and closed with trigger_multiple!

Post by Phantomwarrior »

I've read posts regarding trapdoor open and close of areaportal and they seemed to use more than one trigger_use to function for openportal and closeportal in the script with the trapdoor entity actuating the worldspawn areaportal brush open and close. However, I want to set an areaportal brush to portal certain locations (without a door in the way) and that can be actuated by trigger_multple. In theory, the areaportal would contain a portaled area in a hallway until a player entity entered the trigger_multiple, then the areaportal would be made openportal while the player entity is in the trigger_multiple brush, and when the player leaves the trigger_multiple the areaportal would return to closeportal condition. Is this possible! I've exhausted my usual resources and references trying to make this work, I would appreciate any mapping guru help I can get on this. I know this isn't a usual application of the areaportal, but it will be very handy to reinforce fps where I want to use it.
Phantomwarrior
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

Create a brush , give it the nodraw texture and make it a script_object with a targetname like myportal for example . Put the areaportal brush inside it then use something like this

mythread:
while(1)
{

$mytrigger waittill trigger

local.player=parm.other

$myportal openportal

while(local.player istouching $mytrigger)
waitframe

$myportal closeportal

}
end // not needed after an endless loop but good habit to get into

You may have to make the script_object notsolid
Image
Phantomwarrior
Corporal
Posts: 27
Joined: Fri Jan 20, 2006 1:42 am
Location: Bakersfield, California

Post by Phantomwarrior »

Thankyou for the quick response, I'll give it a try. We, my friend Elite Stalker and I are making a map for a Spearhead Level that is very near complete. Thanks for the help!
Phantomwarrior
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Vis_leafgroup

Post by tltrude »

You should learn about Vis_leafgroup. It is used to manually block visibility between groups of leafs (large vis textured brushes that have been turned into vis_leafgroup entities). When a player enters one, every vis_leafgroup it targets will stop drawing its contents. If it is done right, everything vanishes except where the player is.

Here is a totorial map (its for sound) that has a vis_leafgroup demo in it. When you enter the one on the roof, the trees will vanish. The .map file and a playable pk3 are included in the zip. It was made for MOHAA, but it may work in BT.

Download mp_ambient2.zip
Image
Tom Trude,

Image
Phantomwarrior
Corporal
Posts: 27
Joined: Fri Jan 20, 2006 1:42 am
Location: Bakersfield, California

Post by Phantomwarrior »

BDBodger Dude! I tried it and it works great for what we want to do! Thanks again, its like you read my thoughts.
Thanks tltrude for the input, but this has a little different application for us than Vis_leafgroups. :wink:
Phantomwarrior
Post Reply