Page 1 of 1

Areaportal opened and closed with trigger_multiple!

Posted: Tue Feb 14, 2006 6:06 am
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.

Posted: Tue Feb 14, 2006 6:11 am
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

Posted: Tue Feb 14, 2006 7:48 am
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!

Vis_leafgroup

Posted: Tue Feb 14, 2006 10:14 am
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

Posted: Tue Feb 14, 2006 8:35 pm
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: