Talk:Changed

From Second Life Wiki
Revision as of 21:55, 20 February 2010 by Cerise Sorbet (talk | contribs) (CHANGED_REGION and CHANGED_TELEPORT not in default state)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

CHANGED_REGION and CHANGED_TELEPORT not in default state

This caveat went on the change page.

If there is no changed event in the default state, the changed event will not be triggered in other states for CHANGED_REGION or CHANGED_TELEPORT. An empty changed state in default corrects this.

I cannot reproduce it with this script. It works OK with the teleport and a walk over a region line for me, both on LSO and on Mono. <lsl> default {

   state_entry()
   {
       llOwnerSay("default state_entry");
       state other;
   }

}

state other {

   state_entry()
   {
       llOwnerSay("other state_entry");
   }
   changed(integer change)
   {
       if (change & CHANGED_TELEPORT)
       {
           llOwnerSay("got CHANGED_TELEPORT");
       }
       if (change & CHANGED_REGION)
       {
           llOwnerSay("got CHANGED_REGION");
       }
   }
   touch_start(integer num)
   {
       llOwnerSay("reset on touch");
       llResetScript();
   }

} </lsl> Is there a script that can show the trouble? Maybe it is better to put that on the JIRA than on here if it can happen. --Cerise Sorbet 05:55, 21 February 2010 (UTC).