Jump to content
Sign in to follow this  
EvenLease

Script to change from day to night and reverse?

Recommended Posts

Hi all, I'm not good with any sort of scripting my self yet.

Was wondering if someone could help me find a script that, when you go up to a flag pole you can use the action menu to change it from day to night, or from night to day.

Multiplayer compatible and all, it would be nice :P

So if anyone can help, would be much appreciated!

Share this post


Link to post
Share on other sites

Yep, if you want to know exactly what is "night" and "day" unfortunately the engine doesn't really define anything so concrete.

I made a script utilizing another bit of code by rube which takes sunrise/sunsets into account, and randomizes the time making some decisions about that.

You could technically co-opt the same code and tell it that it MUST pick a time between sunset and sunrise for night, or between sunrise and sunset for day.

See: http://forums.bistudio.com/showthread.php?148411-A-method-of-getting-weighted-date-time-randomization

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×