how do i lock a door!

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

Moderator: Moderators

Post Reply
chad
Corporal
Posts: 39
Joined: Fri Jul 11, 2003 1:48 am
Location: Australia

how do i lock a door!

Post by chad »

okays i have got a room with my door that i want locked but i dont want it to not do anything by putting thg the texture there and not making it open i just want it locked so it makes the noise like it's locked
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

doorlocked

Post by tltrude »

Place a trigger_use in front of the door and give it Key: $targetname and Value: door_locked. Then in your script under "level waittill prespawn" put this line:

exec global/door_locked.scr::lock

Now you can put as many of those triggers as you like around the map. If you dont have a script, the one below will do for now. Just change the name of the map in it and save it as "yourmapname.scr". It goes in the same folder as your bsp file.

Code: Select all

main:

level waittill prespawn

	//*** Precache Dm Stuff
	exec global/DMprecache.scr
	exec global/door_locked.scr::lock
	level.script = maps/dm/yourmapname.scr  // Change this
	exec global/ambient.scr mohdm7 // Background sound

level waittill spawn

end
Last edited by tltrude on Thu Aug 21, 2003 2:20 pm, edited 1 time in total.
Tom Trude,

Image
chad
Corporal
Posts: 39
Joined: Fri Jul 11, 2003 1:48 am
Location: Australia

locked doors

Post by chad »

okays i haven't done any kind of scrpiting or anything like that b4 so if you could expllain this is terms for a dummie that would help.

thanx
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

My advice would be to read through all of Bjarne's excellent scripting tutorial.

http://www.planetmedalofhonor.com/rjuka ... guage.html

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

Post by jv_map »

If your door actually is a func_door or func_rotatingdoor, you can simply type key / value:
lock / [no value]

8-)
Image
Post Reply