Wandering Soulstar
Registered User
Join date: 23 Feb 2009
Posts: 16
|
11-09-2009 00:17
Did a search and could not find this. I have come across a situation where the touch_start event will not fire until you touch the prim again. This seems to occur when from the touch_start event I go to another state. On return to the base state is whenthe event issues occur. If this is changed to a plain touch event, then works fine. Has anyone seen this before??? ----- //
key USER_KEY;
default { state_entry() { llSay(0, "In Default"); }
touch_start(integer total_number) { llSay(0, "In Touch Start");
//Do some stuff then go to the dialog state USER_KEY = llDetectedKey(0); state dialog; } }
state dialog { state_entry() { //Show a dialog llDialog(USER_KEY, "Nothing really going on", ["Ha", "Ho"], -301000); llListen(-301000, "", NULL_KEY, ""); //start a timer in case the user does not respond .. or clicks ignore llSetTimerEvent(30.0); }
listen(integer channel, string name, key id, string message) { //respond to the dialog //return to main state state default; }
timer() { //timed out, return to main state llSetTimerEvent(0.0); state default; } }
//
|
Rebekka Revnik
Registered User
Join date: 26 Mar 2008
Posts: 18
|
11-09-2009 00:21
That's a common problem. You have to change states in the touch_end event instead.
|
Wandering Soulstar
Registered User
Join date: 23 Feb 2009
Posts: 16
|
11-09-2009 00:32
Thanks Rebekka .. yes I had seen that if I changed states in the other touch events it worked fine ... just curious really if anyone had an explination as to why this is happening.
|
Wandering Soulstar
Registered User
Join date: 23 Feb 2009
Posts: 16
|
11-09-2009 05:12
Ok .. thinking about it I guess I understand why this acts as it does. By changng state in the touch_start the touch-end never fires. so there must be a marker in the event that notes that a touch_start fired without the corresponding touch_end. Next time there is a touch the start does not fire but the end does and thus the cycle is complete.
|
Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
|
11-09-2009 20:55
There's a lengthy discussion of the issue at https://jira.secondlife.com/browse/SVC-3017
|