Jump to content

Script for Day/Night detection?


DaemonGrin

Recommended Posts

I am modifying a house mod for personal use and would like to set up the outside lights to enable at dusk and disable at dawn rather than have a switch to toggle that. Not sure where to start really or what function I am looking for.

 

Thanks,

Geoff

 

RE-EDIT - Figured it out! @.@

Link to comment
Share on other sites

I know you say you figured it out, but it's always polite to include what you did for others who may want to do the same as you - as a matter of fact, I had a lot of trouble figuring this out back in the day because lots of posts were just like yours and didn't share their findings. So while I'm here I guess I can share the script I made for a FO3 mod. :geek:

 

Give all of the lights you want to mess with an enable parent through an XMarker, and give this XMarker a unique ref. Then make a quest with default settings (mine has priority 10), start game enabled, and give it a script like this.

scn LightManagementScript

Begin GameMode	
  if GameHour >= 18 || GameHour < 7	
     LightMarkerREF.enable	
   else	
     LightMarkerREF.disable 
EndIf
END

That will turn off the lights in the morning and turn them on in the evening. :)

Link to comment
Share on other sites

I know you say you figured it out, but it's always polite to include what you did for others who may want to do the same as you - as a matter of fact, I had a lot of trouble figuring this out back in the day because lots of posts were just like yours and didn't share their findings. So while I'm here I guess I can share the script I made for a FO3 mod. :geek:

 

Give all of the lights you want to mess with an enable parent through an XMarker, and give this XMarker a unique ref. Then make a quest with default settings (mine has priority 10), start game enabled, and give it a script like this.

scn LightManagementScript

Begin GameMode	
  if GameHour >= 18 || GameHour < 7	
     LightMarkerREF.enable	
   else	
     LightMarkerREF.disable 
EndIf
END

That will turn off the lights in the morning and turn them on in the evening. :smile:

 

Yes ma'am ; ;

 

I should state that I figured out a script very similar to yours but it is attached to an activator in the cell with the lights parenting in a chain to it so Light > Light > Light > Activator but haven't tested it yet.

 

While I grabbed your attention maybe you can tell me how to enable a challenge via script that I have disabled?

 

Thanks,

Geoff

 

EDIT - :facepalm: I figured it out the function is UnlockChallenge ChallengeID

Link to comment
Share on other sites

  • Recently Browsing   0 members

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