Lili Renilo Posted February 6, 2012 Share Posted February 6, 2012 llSensorRepeat("", NULL_KEY, AGENT, 5, PI, 15);Hello, I am working with the above within a script and keep wondering the following. Is there a way to write a script so that the timing for the initial sensor repeat is 5 seconds but subsequent ones are a different period of time. So for example, object senses avatar and it says something in local after 5 seconds but then with an avatar still in range its subsequent repeats are 10 minutes? And that it would only reset to 5 seconds after there are no avatars in range.I haven't seen it in any of the scripts I have looked at so far... just curious if it is even possible... Thank you, Lili Link to comment Share on other sites More sharing options...
Darkie Minotaur Posted February 6, 2012 Share Posted February 6, 2012 Work with a timer and llSensor instead of llSensorRepeat. To change the timing, use no_sensor and sensor to set the respective timer event. Link to comment Share on other sites More sharing options...
Lucinda Bulloch Posted February 6, 2012 Share Posted February 6, 2012 Try this default{ state_entry() { llSetMemoryLimit(0x4000); llSetTimerEvent(15); } timer() { llSensor("","",AGENT,5,PI); } sensor(integer t) { //do sensor code llSetTimerEvent(5); } no_sensor(){llSetTimerEvent(15);}} Link to comment Share on other sites More sharing options...
Lili Renilo Posted February 6, 2012 Author Share Posted February 6, 2012 Thank you both of you, I will play around with the timer... I haven't come across timers yet in my very early scripting learnings but it sounds like fun Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now