Virrera Posted April 24, 2015 Share Posted April 24, 2015 Can you do a multi state change for texture remapping off a sensor event to create a slide show that only plays when it detects avatars in range?Can I nest state_entries with set timer events?Thanks for any advice, trying not to make a mess! Link to comment Share on other sites More sharing options...
Xiija Posted April 24, 2015 Share Posted April 24, 2015 personally i think states are best avoided use flags? i.e. your sensor detects an Avatar.... integer inRange; // used as a boolean flag state_entry() { llSensorRepeat("", "", AGENT_BY_LEGACY_NAME, 10.0, PI, 30.0); } sensor(integer num_detected) { inRange = TRUE; } no_sensor() { inRange = FALSE; } timer() { if( inRange) // if the flag is TRUE { // start slideshow } } __________________________ if you need multiple timers, have the timer set to 1 second, and use counters for each event you need. ex: one timer needs to fire every 30 seconds, one needs to fire every 5 seconds integer 30SecTimer; integer 5SecTimer; ++30SecTimer; // will add 1 to this counter every second, when it hits 30, do your 30 second event and reset it to zero Link to comment Share on other sites More sharing options...
Virrera Posted April 24, 2015 Author Share Posted April 24, 2015 Ah! Yes, thank you, that's what I was looking for ! Much better 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