jamie Akina Posted May 16, 2012 Share Posted May 16, 2012 Hi I need scripter for a small custom script that will cause a rock that is suspended to fall then reset to a location Thanks Link to comment Share on other sites More sharing options...
Ron Khondji Posted May 16, 2012 Share Posted May 16, 2012 Here is one way to do that: float ResetTime = 5.0;vector StartPos;rotation StartRot;default { touch_end(integer total_number) { StartPos = llGetPos(); StartRot = llGetRot(); state falling; }}state falling { state_entry() { llSetStatus(STATUS_PHYSICS, TRUE); llSetTimerEvent(ResetTime); } timer() { llSetTimerEvent(.0); llSetPrimitiveParams([PRIM_POSITION, StartPos, PRIM_ROTATION, StartRot, PRIM_PHYSICS, FALSE]); state default; }} Link to comment Share on other sites More sharing options...
jamie Akina Posted May 16, 2012 Author Share Posted May 16, 2012 hi there thanks for that , it works .....haha... there is a but ....it does not reset to the origional position other that that its perfect....if you ever need a hand with a build of any kind ...i'm a pretty goood beginner cheers jamie Link to comment Share on other sites More sharing options...
PeterCanessa Oh Posted May 17, 2012 Share Posted May 17, 2012 Could you tell me how high the rock is suspended and how far it tends to fall/bounce/roll when released? My immediate idea for why this does not work is that the position is being set more than 10m away, which is the limit for root prims. Link to comment Share on other sites More sharing options...
Ron Khondji Posted May 17, 2012 Share Posted May 17, 2012 This one does not have the 10m limit. float ResetTime = 5.0;vector StartPos;rotation StartRot;default { state_entry() { if (StartPos) { llSetRegionPos(StartPos); llSetRot(StartRot); } } touch_end(integer total_number) { StartPos = llGetPos(); StartRot = llGetRot(); state falling; }}state falling { state_entry() { llSetStatus(STATUS_PHYSICS, TRUE); llSetTimerEvent(ResetTime); } timer() { llSetTimerEvent(.0); llSetStatus(STATUS_PHYSICS, FALSE); state default; }} Link to comment Share on other sites More sharing options...
jamie Akina Posted May 17, 2012 Author Share Posted May 17, 2012 hi ron wow...thats the ticket...works well...thanks again... so how might i return the favor?contact me in world some time... james Link to comment Share on other sites More sharing options...
RunningHorse Wickentower Posted June 4, 2012 Share Posted June 4, 2012 Hey guys I'd like to take this a step further and make it so it falls all the time and resets itself what would i change the touch_end to to get it to do it continuously? thanks in advance! 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