VirtualKitten Posted June 20, 2020 Share Posted June 20, 2020 I have some code which is rough and want to improve it it basically moves a mesh in a circle using llSetjump to startLinkParamsFast( I have this in a script which uses basic loop http://wiki.secondlife.com/wiki/Jump @start ... Move item llSleep(1) jump to start @end Now I am using llSetScriptState( to stop and start this but it is fraught with problems that i will not go into here. My question is how to make this into one script with my other code . The problem is house-keeping and there is not much time-slice afforded to llListen or MessageLink events. How then do i properly script movement in LSL script .As i think i am missing something vital Thanks for looking D Link to comment Share on other sites More sharing options...
KT Kingsley Posted June 20, 2020 Share Posted June 20, 2020 (edited) I think a timer might help here: timer () { //move object } To start the timer, and start moving the object: llSetTimerEvent (1.0); and to stop the timer, and stop moving the object: llSetTimerEvent (0.0); Edited June 20, 2020 by KT Kingsley 1 Link to comment Share on other sites More sharing options...
Sabrina Tamerlane Posted June 20, 2020 Share Posted June 20, 2020 KT Kingsley is correct, but you will also have to remove anything that puts the script to sleep if you want a regular timing. Link to comment Share on other sites More sharing options...
Rolig Loon Posted June 21, 2020 Share Posted June 21, 2020 22 hours ago, Sabrina Tamerlane said: KT Kingsley is correct, but you will also have to remove anything that puts the script to sleep if you want a regular timing. Yes, and remove the stuff that has to do with jump too. It might be a good idea to step back and go through a basic LSL tutorial to familiarize yourself with the state/event structure that is the foundation of LSL, then take a special look at how a timer event works. Link to comment Share on other sites More sharing options...
VirtualKitten Posted July 3, 2020 Author Share Posted July 3, 2020 Thanks for the replies very helpful 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