Jump to content

Making lights turn on only at night


NDDragor

Recommended Posts

I have made a checkpoint in my mod and it has many big searchlights which are lighting up the area around. It looks really good at night but during the day the lights make the place too bright and it looks really bad. So what I wanna know is if there is a way to make the lights in that area turn themselves on each evening and turn off each morning so that they would lighten up the place only at night when its dark. I think it could be done with a script like at some interiors where all lights turn on after you use a lever.

 

 

Link to comment
Share on other sites

To turns lights off from 7am - 7pm

 

- make all lights persistent refs

- set all lights to be children of just one of them, let's call this parent one Light01REF

 

Script on that light would be:

scn scriptnamehere
 
Begin GameMode

    if GetCurrentTime > 7 && GetCurrentTime < 19

        Light01REF.Disable

    elseIf GetCurrentTime < 7 || GetCurrentTime > 19

        Light01REF.Enable

    endIf

End

Should work. Might be a more elegant way.

Edited by Mishaxhi
Link to comment
Share on other sites

  • Recently Browsing   0 members

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