Can a door be targetted by more then one trigger?

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Ramah Palmer
Warrant Officer
Posts: 131
Joined: Sun May 25, 2003 10:13 am
Location: Nottinghamshire: UK

Can a door be targetted by more then one trigger?

Post by Ramah Palmer »

I would have thought so, but I have a problem that I cannot seem to solve. Because of the nature I of the map I am making (a kind of one-way cage system) I cannot use doors targetted by triggers. So I have a multiple trigger used to open a door using a thread with the following:

$first_door open $first_door_origin

and once through this door there is another trigger that opens the next door in the same way and closes the one just passed through. Or at least it is supposed to but I cannot seem to make my doors close.
All the doors are func_door for ease of use rather than func_rotating_door.
I've tried both:

$first_door close

&

$first_door close $first_door_origin

but neither work.
Any ideas anyone?
Mapping is just INCREDIBLY time consuming.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

$mydoor close $world is supposed to work (as is yours). Maybe make the door a crushing one?
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

toggled

Post by tltrude »

I think the door has to be set for "toggle" or it ignores the close command and uses the automattic close command. You may also need to set "targeted".
Tom Trude,

Image
Ramah Palmer
Warrant Officer
Posts: 131
Joined: Sun May 25, 2003 10:13 am
Location: Nottinghamshire: UK

Post by Ramah Palmer »

I've got both the 'toggle' and the 'targetted' parameters checked m8.

What does the '$world' code do? I've never come across that one before and yes, form everything that I've read on here the syntax of my .scr seems to be fine. I just wondered if perhaps it was because I was targetting the same door from two different triggers? Or maybe it's because I am using a sliding door and not a rotating one? (It seems odd that you would need to include a script origin to open a sliding door - the damn thing only opens one way).

I think in another post I did Tom you replied with a trigger having the key/value of 'cnt' and '1'. This sounds like it could possibly help me but is there any way of resetting the count once it has been used?
Mapping is just INCREDIBLY time consuming.
Ramah Palmer
Warrant Officer
Posts: 131
Joined: Sun May 25, 2003 10:13 am
Location: Nottinghamshire: UK

Post by Ramah Palmer »

Ok, the problem I think is my script. I'm doing something wrong but I'm not sure what.
What I have is the multiple trigger calls up a thread called close_door
The thread is then like this:

$first_door close $first_door_origin
$first_door_trigger nottriggerable
end

And that is it. Now if I take out the nottriggerable line it closes ok but continues making the door close sounds whenever I am standing on the trigger. If I leave the nottriggerable line in it makes the closing door sound once but does not close.
So any ideas whay my thread should be?
Mapping is just INCREDIBLY time consuming.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

world

Post by tltrude »

$first_door close $world
$first_door_trigger nottriggerable
end


You don't need a script origin if you use $world. You could also use "local.player" as the closing entity. But "$world" is short for the "worldspawn" entity of the map--every brush that is not a script entity or model.

Here are some threads I did for a pair of vent doors. they both have wheels in the center that have to turn before the door opens and after it closes.

Code: Select all

ventdoor_prep:

	$vent_door1_trigger bind $vent_door1
	$vent_door2_trigger bind $vent_door2
	$vent_door1_wheel bind $vent_door1
	$vent_door2_wheel bind $vent_door2
	$vent_door1_wheel time 2
	$vent_door2_wheel time 2
	thread ventdoor1
	thread ventdoor2

end

ventdoor1:

	$vent_door1_trigger waittill trigger
	local.doorman = parm.other
	$vent_door1_wheel rotateZdown 360
	$vent_door1_wheel loopsound flywheel_turn
	$vent_door1_wheel waitmove
	$vent_door1_wheel loopsound flywheel_turn wait
	$vent_door1 open local.doorman
	wait 4
	$vent_door1 close local.doorman
	wait 1.5
	$vent_door1_wheel rotateZup 360
	$vent_door1_wheel loopsound flywheel_turn
	$vent_door1_wheel waitmove
	$vent_door1_wheel loopsound flywheel_turn wait
	goto ventdoor1

end

ventdoor2:

	$vent_door2_trigger waittill trigger
	local.doorman = parm.other
	$vent_door2_wheel rotateZup 360
	$vent_door2_wheel loopsound flywheel_turn
	$vent_door2_wheel waitmove
	$vent_door2_wheel loopsound flywheel_turn wait
	$vent_door2 open local.doorman
	wait 4
	$vent_door2 close local.doorman
	wait 1.5
	$vent_door2_wheel rotateZdown 360
	$vent_door2_wheel loopsound flywheel_turn
	$vent_door2_wheel waitmove
	$vent_door2_wheel loopsound flywheel_turn wait
	goto ventdoor2

end
Last edited by tltrude on Sat Sep 20, 2003 6:45 am, edited 1 time in total.
Tom Trude,

Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Not sure if this is the case, but did you target the triggers to the door(s) in Radiant? If so, there could be 'interference' between the script close command and the automatic door closing / close event caused by the trigger.

So go for an entirely scripted door :wink:
Image
Ramah Palmer
Warrant Officer
Posts: 131
Joined: Sun May 25, 2003 10:13 am
Location: Nottinghamshire: UK

Post by Ramah Palmer »

Ok thanks you two for your help. Going through your script m8 the only thing I could see there that could possibly help me that I hadn't tried was to place a WAIT after the CLOSE command before making the trigger nottriggerable. This seems to have done the trick! Thanks.
Still seems strange that it would work this way though.
And JV, the door isn't physically targetted by any trigger, the trigger just calls up the close_door thread.
Anyhoos, thanks. :)
Mapping is just INCREDIBLY time consuming.
Post Reply