I have the following script that is working within SL but does not always work in OpenSim. Sometimes it works other times it does not. Can anyone see anything that would be causing issues on Opensim
<div><br></div><div><div>vector DEST = <130, 182, 36>;</div><div>vector SITPOS = <0,0,0.5>;</div><div>key gAv;</div><div> </div><div>moveTo(vector origin, vector destination ) { // removed jumpdist</div><div>
float dist = llVecDist(origin, destination);</div><div> integer passes = llCeil( llLog(dist/10.0) / llLog(2.0) );</div><div> integer i;</div><div> list params = [PRIM_POSITION, destination];</div><div> for (i=0; i<passes; i++) {</div>
<div> params = (params=[]) + params + params;</div><div> }</div><div> llSetPrimitiveParams(params);</div><div>}</div><div> </div><div>teleport(key av) {</div><div> if (av == NULL_KEY)</div><div> {</div>
<div> return;</div><div> }</div><div> </div><div> vector origin = llGetPos();</div><div> llSetAlpha (0.0, ALL_SIDES);</div><div> moveTo(origin, DEST);</div><div> // no need to sleep -- llSetPrimParams has 0.2s delay</div>
<div> llUnSit(av);</div><div> moveTo(DEST, origin);</div><div> llSetAlpha (1.0, ALL_SIDES);</div><div>}</div><div> </div><div>default</div><div>{</div><div> state_entry()</div><div> {</div><div> llSetClickAction (CLICK_ACTION_SIT);</div>
<div> llSitTarget(SITPOS,llEuler2Rot(<0,0,-90> * DEG_TO_RAD));</div><div> }</div><div> </div><div> changed(integer changebits)</div><div> {</div><div> if (changebits & CHANGED_LINK)</div>
<div>
{</div><div> gAv = llAvatarOnSitTarget();</div><div> if (gAv != NULL_KEY)</div><div> {</div><div> teleport(gAv);</div><div> }</div><div> }</div><div>
}</div><div>}</div></div>