Jump to content

QuietWren

Resident
  • Posts

    5
  • Joined

  • Last visited

Everything posted by QuietWren

  1. Changing the change test to the mask fixed the problem Thanks!
  2. I'm making a script to add to existing chairs. It's supposed to note when a person sits on or unsits from the chair it's in, but for some reason it's only seeing the sit. Here is the snippet that is supposed to see the change: changed(integer change) { if (change == CHANGED_LINK) { llOwnerSay("The number of links has changed"); kSitter = llAvatarOnSitTarget(); if (kSitter == NULL_KEY) { llOwnerSay("Stand"); onStand(); } else { llOwnerSay("Sit"); onSit(); } } } This works correctly for sits, firing the correct OwnerSays, but on standing up from the chair it's silent. Could this be blocked from change events by other scripts in the chair?
  3. I wish they would bring that discussion back! But to return to the original topic of turning lights on and off-- The black box that is SL day simulation suggests that (without the 15 degree offset) a Z test value of -.71 would give you actual daylight, and maybe use something more negative to capture twilight. I wonder if that 15 degrees offset is a universal constant, or it varies from place to place, or from day to day? And don't start me on the way they do the moon and stars!
  4. See my simultaneous edited comment above I think this is more about LL's geometry than a horizon effect...and I was using shadows, not twilight. I agree, for any meaningful purpose 10s was far too short, but this was just an ad hoc thing to pin down sunrise/sunset times.
  5. I tried the approach of turning lights on and off on the basis of the sun's Z position but had poor results, so I created a prim and had it report the sun position every 10 seconds: default { state_entry() { llSetTimerEvent(10.0); } timer() { vector sun = llGetSunDirection(); llSetText("Sun X = " + (string)sun.x + "\nSun Y = " + (string)sun.y + "\nSun Z = " + (string)sun.z, <1.0,1.0,0.0>, 1.0); } } What I found is that one "evening" the Sun was still casting shadows when Z was -0.47; the next "morning" the sun resumed casting shadows when it was at Z = -0.87, so the method of using Z < 0 for night seems like it won't work reliably? Some math makes more sense of this, maybe. Z = -.87 and Z = -.47 are when the sun is 60 and 28 degrees below the horizon, respectively. This means the sun was "up" for a total of 60+28+180, or 268 degrees. Probably if I had measured more carefully that would be 270 degrees, or exactly 3/4 of a circle. This makes sense because the sun is "up" for three hours out of four. For some reason there's a 15 degree offset included in this.
×
×
  • Create New...