locking doors question Created 20 years ago2004-09-19 19:41:10 UTC by z80cpu z80cpu

Created 20 years ago2004-09-19 19:41:10 UTC by z80cpu z80cpu

Posted 20 years ago2004-09-19 19:41:10 UTC Post #60735
hi,

i have a hopefully a simple question. i have looked all around on here & elsewhere and cant find the answer. what i am trying to do, is to to 'emulate' i guess what you could call a 'child lock' found on cars.
when the door lock is on, the back doors will not open, when door lock is off, doors operate as if there was no 'door lock'.

when master switch is 'set on', all doors cannot be opened (this i found out how to do). and when player uses door, it is locked.

when master switch is 'set off', all doors operate normally. player can come & go thru the doors w/o problems. (doors NOT staying open, but rather opening/closing as if there was no switch involved).

when switch is on, doors locked, when off, all doors work as if there was no switch, open/close normal.

a 'master lock switch' is what is needed.

so if yall have any ideas on how to do this, i would be a thankin ya!

and if you do, please explain in 'novice' terms, though i used to map for doom/heretic, i am 'new' to half-life.

thanks!

:)
Posted 20 years ago2004-09-19 20:16:59 UTC Post #60741
Have a func_button, with toggle flag target a trigger_relay and make the master of the doors the trigger_relay?
RabidMonkey RabidMonkeymapmapmapfapmap
Posted 20 years ago2004-09-20 02:13:42 UTC Post #60776
Or perhaps a multisource, demonstrated in the Example Maps.
Seventh-Monkey Seventh-MonkeyPretty nifty
Posted 20 years ago2004-09-20 11:00:07 UTC Post #60808
i tried the multisource prop & it didnt work. i tried that before i posted. what it WILL do is to open & close the doors for me. what i am seeking is a 'switch' that will ONLY LOCK/UNLOCK doors, NOTHING else. the players would be able to use the doors normally till the 'lock' switch is activated & then the doors become locked & behave that way. when 'lock' is activated again, all doors become unlock. nothing else but lock/unlock. as far as the multisource prop, i did look at the example on here, and maybe i didnt 'code' it correctly, as that was the 1st time i have used it....dont know...??? what i am seeing so far from the 2 posts will OPEN/CLOSE doors...not just lock/unlock them....

:)
Posted 20 years ago2004-09-20 11:29:50 UTC Post #60815
you could have some sort of invisible barrier in front of the doors, that when the lock is triggered, would disappear. all oyu need is a func_wall_toggle, texture {BLUE with rendermode solid and renderamount 255.
Posted 20 years ago2004-09-20 11:40:18 UTC Post #60819
Try a func_button with Toggle flag set, as RM recommends, targetting a multisource. Set the multisource as the master of the trigger that opens and closes the doors. When the func_button is 'on,' the doors are unlocked and vice-versa.
Posted 20 years ago2004-09-20 12:08:21 UTC Post #60822
before i go to the trouble of testing a relay switch...how would i tell the game to lock/unlock the doors vs. opening/closing? in the multisource demo...that is just what happens...all it does it open/close the doors...when the door is closed...it is still locked....that is not what i am seeking...rather just a switch that controls the locking function ONLY....the players would control the opening/closing of the doors like normal...

master lock switch 'off' =

players go from room1 to room2 thru door1 w/o problems (door opens/closes UNDER NORMAL PLAYER CONTROL)

master lock switch 'on' =

players go from room1 to room2 thru door1 & get 'locked door sound' at door1 (door is closed AND locked)

and i have considered a 'inviso wall' to do this, but it would be easier (i think) to have a switch...but maybe you cant....????
Posted 20 years ago2004-09-20 12:12:59 UTC Post #60823
it would really be alot easier to use the wall, but if you want some experience in handling that sort of trigger, you should stick with the switch idea.
Posted 20 years ago2004-09-20 12:23:45 UTC Post #60824
thanks steve...i agree with you on that (inviso wall)...the only problem is that the switch controls the opening/closing of the door only...i want it to control the lock/unlock part of it....and with 2 parts in the door (open/close & lock/unlock), and the switch only controlling 1 part (open/close) i dont know if it could even be done...
Posted 20 years ago2004-09-20 14:31:35 UTC Post #60836
no idea what any of that meant. if you want the wall (with me its ALL about the wall) just make a switch targeting the func_wall_toggle.
Posted 20 years ago2004-09-23 20:46:28 UTC Post #61540
You need a combination of a multisource, an env_global, and a func_button to act as your master lock switch. Put the name of the multisource below in the 'master' properties of any doors you want to lock/unlock with the switch. Set it up like this...don't use any capital letters...

func_button
target = global1

env_global
name = global1
GlobalStateToSet = state1
TriggerMode = toggle
InitialState = 'on' if you want the doors unlocked at first, 'off' if not.
Tick the 'set initial state' flag

multisource
name = multi1
target = (leave this blank)
GlobalStateMaster = state1
Posted 20 years ago2004-09-23 21:40:59 UTC Post #61548
SlayerA to the rescue as usual... He always pops up for these type of questions.
Trapt Traptlegend
Posted 20 years ago2004-09-30 13:57:33 UTC Post #63222
thanks for the info slayera.... :)
Posted 20 years ago2004-09-30 14:31:50 UTC Post #63229
slayer a, he KNOWS the global entities.
Posted 20 years ago2004-09-30 20:40:10 UTC Post #63307
You're welcome. Let us know if you need more help. The global entities are worth the trouble to learn. ;)
You must be logged in to post a response.