Blinking/Noise when door is open

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

Moderator: Moderators

Post Reply
Kiko
Major
Posts: 303
Joined: Mon Aug 29, 2005 8:58 pm
Location: US
Contact:

Blinking/Noise when door is open

Post by Kiko »

Hello, I have a trigger that opens a door, not only do I want it to open the door but I want it to set of an alarm and have a blinking light... is that possible???

and if so could someone reply!!! ^.^ a small example would be great, + Il'l leave credits for the coding in the scr and readme file :)

(\_/)
(O.o)
This is Bunny. Copy Bunny
(> <)
to help him achieve world domination.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

setthread

Post by tltrude »

You can add this to your trigger and it will run a thread in your script.

Key: setthread
Value: door_alarm


Then in your script there would be something like this.

door_alarm:

$door_alarm loopsound alarm
thread alarm_light

end

This is totally fake, but you will need to add an entity to act as a speaker for the sound and add a script_model light (dynamic light) that blinks on and off in another thread.

To make it fancy you can add off and on caged lamps that are hidden and shown as the light blinks. There is a light like that in my test_pointer map (ontop the lighthouse). Click on my signature logo to download it.
Tom Trude,

Image
Kiko
Major
Posts: 303
Joined: Mon Aug 29, 2005 8:58 pm
Location: US
Contact:

Post by Kiko »

I know very very very little scripting, actually I dont know any at all :( as whyI asked for the help...

(\_/)
(O.o)
This is Bunny. Copy Bunny
(> <)
to help him achieve world domination.
Post Reply