naughtyniece Posted March 2, 2018 Share Posted March 2, 2018 Hi, I have a prim, it is physical and I drop it and it rolls around then stops. At that point i need the script to run, how do i detect when the prim has stopped moving? thank you Suzie Link to comment Share on other sites More sharing options...
Ruthven Ravenhurst Posted March 2, 2018 Share Posted March 2, 2018 You'll want to use the event, moving_end 2 Link to comment Share on other sites More sharing options...
Love Zhaoying Posted March 2, 2018 Share Posted March 2, 2018 You may need both moving_start and moving_end events, in case you want to detect that it actually moved, then stopped moving. Others may give you a different answer. http://wiki.secondlife.com/wiki/Moving_start 1 Link to comment Share on other sites More sharing options...
Rolig Loon Posted March 2, 2018 Share Posted March 2, 2018 (edited) Yeah, friction is a bear. You could try a moving_end event, I suppose. That's sometimes reliable, especially if you aren't too picky about what "end": means. EDIT: Man, you guys are pretty fast for a Friday afternoon. Edited March 2, 2018 by Rolig Loon 2 Link to comment Share on other sites More sharing options...
Love Zhaoying Posted March 2, 2018 Share Posted March 2, 2018 As a test, put moving_end event in your script and have it say something when the event runs. 1 Link to comment Share on other sites More sharing options...
Love Zhaoying Posted March 2, 2018 Share Posted March 2, 2018 1 minute ago, Rolig Loon said: Yeah, friction is a bear. You could try a moving_end event, I suppose. That's sometimes reliable, especially if you aren't too picky about what "end": means. EDIT: Man, you guys are pretty fast for a Friday afternoon. I was also going to suggest she may end up needing a timer and a flag to make sure it stopped moving “long enough”. Just because the event fires won’t necessary mean it’s totally done, right? 1 Link to comment Share on other sites More sharing options...
Xiija Posted March 2, 2018 Share Posted March 2, 2018 (edited) haven't played with these for a while... vector ac; if(llVecMag(ac = llGetAccel()) < .001) { llMoveToTarget(llGetPos(), .1) //stopping ?} vector spd; if (llVecMag(spd = llGetVel()) < .001) { llMoveToTarget(llGetPos(), .1) //stopping ?} Edited March 2, 2018 by Xiija 1 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