|
Kaylan Draken
Registered User
Join date: 2 Dec 2006
Posts: 127
|
08-04-2008 10:05
I have a question about llDialog, Listen , Timer and Lag. I don't have a script problem with it but want to understand it better.
Situation 1: Touch_event - Start timer 60 seconds - Set llListen - Set llDialog
Listen - handle menu options - Remove Listen
Timer - Remove Listen in case user used ignore button
Situation 2: Touch_event - Set llListen - Set llDialog
Listen - handle menu options - Remove Listen
I think situation 1 is better in cases when the script is only touched few times a day or less. And situation 2 is maybe better when the script is touched lot of times a day.
Maybe its better to have a listen_event 'open' when the user click on the Ignore button of llDialog then use a timer_event to close it. I read timer-events causes lot of lag.
Am i right with this? Or is there a better way to close a Listen after the user touch Ignore?
Thanks in advance
|
|
Viktoria Dovgal
…
Join date: 29 Jul 2007
Posts: 3,593
|
08-04-2008 10:21
Instead of building and tearing down listens all day, you could use llListenControl to make it trigger events or not as needed.
There is going to be a certain amount of overhead for every event that gets triggered. A timer isn't a bad thing at all, if it stops you from processing listens that you are going to discard anyway.
|
|
Kaylan Draken
Registered User
Join date: 2 Dec 2006
Posts: 127
|
08-04-2008 10:37
Thanks Victoria,
i didn't know that command. If i read the lslwiki correctly then i use llListenControl in stead of llListenRemove. the situation will then look like:
State_entry - Set llListen
Touch_Event - llListenControl(handle, true) - Set llDialog
Listen - handle menu options - llListenControl(handle, false)
But in case the user click on Ignore the listen_event will keep 'Open'. Is it better to let is open or close it with a timer event?
I mean in case the script is touched often a day (15 times a hour or more).
|