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
Blinking/Noise when door is open
Moderator: Moderators
Blinking/Noise when door is open
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
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.
setthread
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.
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.
