Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // simple sun-tracking script by Ghosty Kips.
- integer switch = TRUE;
- vector sun;
- default
- {
- state_entry()
- {
- llSetColor(<1,1,1>, ALL_SIDES);
- llSetTimerEvent(1);
- }
- timer()
- {
- sun=llGetSunDirection();
- llSetText("Sun Position - Day: " + (string) sun.z, <0,0,0>, 1.0);
- if (sun.z < 0.00)
- {
- state night;
- }
- }
- }
- state night
- {
- state_entry()
- {
- llSetColor(<0,0,0>, ALL_SIDES);
- llSetTimerEvent(1);
- }
- timer()
- {
- sun=llGetSunDirection();
- llSetText("Sun Position - Night: " + (string) sun.z, <1,1,1>, 1.0);
- if (sun.z >= 0.00)
- {
- llResetScript();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement