Difference between revisions of "Talk:Changed"
(CHANGED_REGION and CHANGED_TELEPORT not in default state) |
Fred Gandt (talk | contribs) (→CHANGED_REGION and CHANGED_TELEPORT not in default state: Tested claimed caveat. No caveat as far as I can see.) |
||
Line 43: | Line 43: | ||
</lsl> | </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. --[[User:Cerise Sorbet|Cerise Sorbet]] 05:55, 21 February 2010 (UTC). | 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. --[[User:Cerise Sorbet|Cerise Sorbet]] 05:55, 21 February 2010 (UTC). | ||
:Tested: Made fresh script and using the above had the following returned in chat when teleporting and walking between regions - | |||
Object: default state_entry | |||
Object: other state_entry | |||
Object: got CHANGED_TELEPORT | |||
Object: got CHANGED_REGION | |||
Connecting to in-world Voice Chat... | |||
Connected | |||
Object: got CHANGED_REGION | |||
Connecting to in-world Voice Chat... | |||
Connected | |||
-- '''[[User:Fred_Gandt|Fred Gandt]]''' <sup><small>([[User talk:Fred_Gandt|talk]]|[[User:Fred_Gandt/Scripts|scripts]]|[[Special:Contributions/Fred_Gandt|contribs]])</small></sup> 06:21, 21 February 2010 (UTC) |
Revision as of 22:21, 20 February 2010
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).
- Tested: Made fresh script and using the above had the following returned in chat when teleporting and walking between regions -
Object: default state_entry
Object: other state_entry
Object: got CHANGED_TELEPORT
Object: got CHANGED_REGION
Connecting to in-world Voice Chat...
Connected
Object: got CHANGED_REGION
Connecting to in-world Voice Chat...
Connected
-- Fred Gandt (talk|scripts|contribs) 06:21, 21 February 2010 (UTC)