Jump to content

Setting up simple timer scripts for lights?


Guest Messenjah

Recommended Posts

Guest Messenjah

So, I'm going to try and work on a few tricky aspects for my nightclub. I need to create two simple stages with stages that have timed lights set up on them. Originally I wanted to have a set up where it was all timed with different songs but that seems to be a VERY difficult task to accomplish so I'm going to go with a more feasible route.

 

I'm going to create a radio station with speaker activators. These activators will be linked to some kind of switch or trigger that is scripted to shut off the speakers at a certain time of night and then resume again at a specific point. They will shut off temporarily for a stage show.

 

The timed lights will also be linked to this switch and will activate/de-activate at a certain time. The lights will consist of one light beam effect, and a light. All I need is for them to fade in and out quickly in sequence with each other. There are 3 different lights and I want the timer to rotate between them. Problem is, I haven't scripted in ages.

 

Can anyone explain exactly how I need to go about setting up these lights on timers for fade-in/fade-out? The also need to run all the time unless I otherwise specify them to do something different. I also need some kind of an off switch for these lights, maybe a central activator that is hidden in the cell?

Link to comment
Share on other sites

Its not completely what you want and i dont have time to go into the finer details here, but have a look at my mod page:

 

http://www.newvegasnexus.com/downloads/file.php?id=39767

 

in the discussions (handy things ive learnt) theres a script i put up for a delayed light switching on after the switch is pressed, its a bit rough though and some of the variables might not make sense but it bugged me that the lights would come on before the lightswitch had finished animating so i delayed it for a second or 2, it might get your timings once they are on sorted, if no one else has helped significantly, ill try and jump on later once ive finished doing what im doing and help come up with some timings based on the hour of the day.

 

oh and youll need this:

 

http://geck.bethsoft.com/index.php/GetCurrentTime

 

Hope it helps.

Link to comment
Share on other sites

Guest Messenjah

Ok, you will need to use your imagination a bit to read this rough concept script. I'm sure this won't run in-game and it is probably broken in about 200 different ways lol. But it should give you the idea of what I need the script to accomplish.

 

Wherever, I talk about a light, I am talking about BlueREF I am talking about my light. This version will be designed to run all of the time between 12 and 1 AM.

 


scn FFStageLightsSCRIPT

ShowTime
Timer

PurpleOn
BlueOn
WhiteOn

PurpleOFF
BlueOFF
WhiteOFF

PurpleReady
BlueReady
WhiteReady
;declared variables

Set Showtime to GetCurrentTime > 24 || GetCurrentTime < 1


Set PurpleOn to PurpleREF.enable 0
Set BlueOn to BlueREF.enable 0 
Set WhiteOn to WhiteREF.enable 0
;these set the corresponding variables to enable the light reference without fading in.


Set PurpleOFF to PurpleREF.enable 0 && PSpotLightREF.disable 0
Set BlueOFF to BlueREF.enable 0 && BSpotLightREF.disable 0
Set WhiteOFF to WhiteREF.enable 0 && WSpotLightREF.disable 0
;these set the corresponding variables to disable the light reference without fading out.

;the following is the script at work. Hopefully it will loop correctly.

If Showtime
;if the time is between 12 and 1AM

If PurpleOFF & BlueOFF & WhiteOFF
Set PurpleON
;if all lights are off, turn the purple light on.


elseif  PurpleON && Timer > 2
Set BlueON
Set PurpleOFF
Set WhiteOFF
;but if the purple light is on and 2 seconds have passed by, turn on the blue light on and shut all other lights off.

elsif BlueON && Timer > 2
Set WhiteON
Set BlueOFF
SetPurpleOFF
;but when the blue light is on and 2 seconds have passed by, turn on the white light

else
set PurpleOFF && BlueOFF && WhiteOFF
;Otherwise, turn off all lights

end
end

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...