Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

timer vs. sensorrepeat

Tad Jensen
Script Junkie
Join date: 29 May 2004
Posts: 24
11-19-2004 15:48
is there any performance / lag difference between using llSetTimerEvent(5) in conjunction with llSensor versus just using a llSensorRepeat with interval of 5?

granted, using the timer there would be code to stop the timer while the sensor event is called and potentially reset the llSetTimerEvent back to an interval of 5 if some condition is met or not met when my sensor event is done.

i believe you can do the same with llSensorRepeat as in using llSensorRemove... does this finish processing the sensor event if you issue llSensorRemove inside of itself?
Water Rogers
Registered User
Join date: 1 May 2003
Posts: 286
11-19-2004 16:26
From: Tad Jensen
i believe you can do the same with llSensorRepeat as in using llSensorRemove... does this finish processing the sensor event if you issue llSensorRemove inside of itself?


If you call a sensor remove in a sensor() event, it will stop any more calls to scan (Ie, it will set the sensorrepeat timer to 0)... A sensor event is triggered when something is sensed, so it will carry out any code within the event after something's been sensed.

--Water
_____________________
From: Philip Linden

For the more technically minded - the problem is actually NOT the asset server (or 'asshat' as you prefer to affectionately call it herein).
Cross Lament
Loose-brained Vixen
Join date: 20 Mar 2004
Posts: 1,115
11-19-2004 16:27
From: Tad Jensen
i believe you can do the same with llSensorRepeat as in using llSensorRemove... does this finish processing the sensor event if you issue llSensorRemove inside of itself?


In my experience, calling llSensorRemove() within the sensor() event does not interfere with the processing of said sensor() event... it'll just prevent any new sensor() event callbacks. :)

EDIT: What Water said. :D
_____________________
- Making everyone's day just a little more surreal -

Teeple Linden: "OK, where did the tentacled thing go while I was playing with my face?"
Tad Jensen
Script Junkie
Join date: 29 May 2004
Posts: 24
11-20-2004 18:44
has anyone had any experience with the performance / efficiency portion of my question?
Water Rogers
Registered User
Join date: 1 May 2003
Posts: 286
11-20-2004 19:58
From: Tad Jensen
has anyone had any experience with the performance / efficiency portion of my question?


seems redundant to me to use a timer with sensor if there is already one prebuilt into an LL function.

--Water
_____________________
From: Philip Linden

For the more technically minded - the problem is actually NOT the asset server (or 'asshat' as you prefer to affectionately call it herein).