Areaportal opened and closed with trigger_multiple!
Moderator: Moderators
-
Phantomwarrior
- Corporal
- Posts: 27
- Joined: Fri Jan 20, 2006 1:42 am
- Location: Bakersfield, California
Areaportal opened and closed with trigger_multiple!
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
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
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
-
Phantomwarrior
- Corporal
- Posts: 27
- Joined: Fri Jan 20, 2006 1:42 am
- Location: Bakersfield, California
Vis_leafgroup
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

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

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

