Only the most recent sensor event is queued.
Previous sensor events are replaced.
So, what does this mean to you? If you're using sensors, and you're sending sensor messages fairly quickly one after another, and the sim starts to lag... Your script appears to stop.
Every script has an event queue that holds up to 64 events. Normally these are given to your script in more or less a first come, first served order. If you do something that adds a sensor event ( a llSensor() or llSensorRepeat() call ) then the queue adds it to the end and removes any other sensor events in the queue.
I repeat: If you make a sensor call while you're still waiting for the results of previous calls, you will never see the results of the first call.
Scriptors often talk about problems or look over each others' code when it isn't working as expected. Sometimes another set of eyes can spot whatever it is that's driving you nuts. I've spotted this one in several "broken" bits of code this month, so I figure it's time to write it up somewhere. LSL has its quirks, and at least in a SL environment this is one of them.
09 November 2011
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment