Page 1 of 1
Blinking/Noise when door is open
Posted: Wed Aug 31, 2005 5:26 am
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

setthread
Posted: Wed Aug 31, 2005 8:25 am
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.
Posted: Wed Aug 31, 2005 2:33 pm
by Kiko
I know very very very little scripting, actually I dont know any at all

as whyI asked for the help...