doors

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

Moderator: Moderators

Post Reply
dr shenker
Sergeant
Posts: 65
Joined: Mon Jan 26, 2004 7:23 pm
Contact:

doors

Post by dr shenker »

how do i make it that you must unlock the door from another place as where the door acualy is?
:?:
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

trigger

Post by tltrude »

This Tutorial map has a doors like that.

http://pages.sbcglobal.net/tltrude/Temp ... e_test.zip

Image
Last edited by tltrude on Sat May 08, 2004 12:58 pm, edited 2 times in total.
Tom Trude,

Image
dr shenker
Sergeant
Posts: 65
Joined: Mon Jan 26, 2004 7:23 pm
Contact:

Post by dr shenker »

thank you
but i don't know how to juse targets or triggers
can you explain that to me?
RiceKrispies
Private
Posts: 9
Joined: Thu May 06, 2004 8:01 pm

Post by RiceKrispies »

Well first find your spot to put your trigger (or your "switch" so-to-speak). Once you find the spot you can make our own switch looking brush or use a model, but thats not important. Thats just there to look like a switch, and tell you where it is.

Then place a brush over it, then right click and select func/trigger/use. It should green, transperant texture over it now. Now with that still selected open your entity window (N), and in the blank where is says "key" put this in: "target" (without the quotes). Then in the "value" blank put: "door1" (or anything you want to name it and of course without quotes).

Now once you've built your door select it and open your entity window once again. In the "key" blank put: "targetname" (without the quotes again). In the "value" blank type: door1 (or whatever you named your door earlier)

There should now be a blue line connecting the switch and the door. If you've got that, your almost done. Now with the door still selected and the entity window still open, select the checkbox that says "targeted" which is right above the key and value blanks.

If you have any questions E-mail me at rk@ck-clan.com . Or AIM me at midgetmafia00. Hope it helps!
Image
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Post by blue60007 »

But if you don't want to open it, just unlock it you can make the trigger_use and door like the others said. THen in the script you can do:

(with the door targetname of door1 and the trigger_use a targetname and setthread of door1_unlock)

Code: Select all


door1_unlock:

$door1 unlock

end
likewise to lock it again just add:

Code: Select all


$door1 lock
if you had a trigger_use on the other side to lock it...
Image
dr shenker
Sergeant
Posts: 65
Joined: Mon Jan 26, 2004 7:23 pm
Contact:

Post by dr shenker »

but where and how do i script??

and for that switch, can i just use a little peice of a wall(in a different brush offcourse) ?
-^IW^-dr shenker
The Real DM==>released@
http://www.project-engsbergs.tk
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Post by blue60007 »

dr shenker wrote:but where and how do i script??

and for that switch, can i just use a little peice of a wall(in a different brush offcourse) ?
well make a file in Notepad and call it mymapname.scr, of course change mymapname to whatever it is. Put this with your bsp file. Then what type of game is it? (DM, SP?) then I could get you set up...


Well you can use anything to be your 'switch' of course the actuall switch will be a trigger_use you should have something to mark the location of the switch...
Image
dr shenker
Sergeant
Posts: 65
Joined: Mon Jan 26, 2004 7:23 pm
Contact:

Post by dr shenker »

blue60007 wrote:
dr shenker wrote:but where and how do i script??

and for that switch, can i just use a little peice of a wall(in a different brush offcourse) ?
well make a file in Notepad and call it mymapname.scr, of course change mymapname to whatever it is. Put this with your bsp file. Then what type of game is it? (DM, SP?) then I could get you set up...


Well you can use anything to be your 'switch' of course the actuall switch will be a trigger_use you should have something to mark the location of the switch...
do you have msn??
add me if you have it::jorenvdb@hotmail.com

that is easyer to talk
-^IW^-dr shenker
The Real DM==>released@
http://www.project-engsbergs.tk
blue60007
General
Posts: 1247
Joined: Sun Mar 07, 2004 11:44 pm

Post by blue60007 »

No sorry...

Tell me what type (DM, OBJ, etc...) you are doing and I'll send a script to you via email...
Image
dr shenker
Sergeant
Posts: 65
Joined: Mon Jan 26, 2004 7:23 pm
Contact:

Post by dr shenker »

DM
and i want to make 5 doors like that
-^IW^-dr shenker
The Real DM==>released@
http://www.project-engsbergs.tk
fuhrer
Captain
Posts: 253
Joined: Sun Mar 14, 2004 3:36 am

Post by fuhrer »

i have a door like this in one of my maps

rotating door,

targetname
door1

soundlocked
door_metal_locked1

add a switch, right click > animate > equipment > electric_switch_nopulse

add a trigger use infront of the switch

setthread
door1_key

SCRIPT:

before level waittill spawn add

Code: Select all

$door1 lock
level.door1_locked = 1
then add this thread

Code: Select all

door1_key: 
	
    	if (level.door1_locked == 1)
	{
	$door1 unlock
       	level.door1_locked = 0
	$switch1 anim on
	iprintln "Door1 unlocked!"
	end
	}
	if (level.door1_locked == 0)
	{
	$door1 lock
	level.door1_locked = 1
	$switch1 anim off
	iprintln "Door1 locked!"
	end
	}
Post Reply