Shihan Feiri Posted July 1, 2011 Share Posted July 1, 2011 Ok Inside script I have in head vector target value: vector target=<232,204,37>; I need that script read vector target from descripton. I have try with llGetObjectDesc(); but have some problem with that . This is TP script:vector target=<232,204,37>; vector offset; default { moving_end() { offset = (target- llGetPos()) * (ZERO_ROTATION / llGetRot()); llSitTarget(offset, ZERO_ROTATION); } state_entry() { llSetText("Return ( Dime )",<0,1,1>,1.0); offset = (target- llGetPos()) * (ZERO_ROTATION / llGetRot()); llSetSitText("Teleport"); llSitTarget(offset, ZERO_ROTATION); } changed(integer change) { if (change & CHANGED_LINK) { llSleep(0.5); if (llAvatarOnSitTarget() != NULL_KEY) { llUnSit(llAvatarOnSitTarget()); } } } touch_start(integer i) { llSay(0, "Please right-click and select Teleport"); } } Link to comment Share on other sites More sharing options...
Zena Juran Posted July 1, 2011 Share Posted July 1, 2011 You might try something like this... vector target(){ return (vector)llGetObjectDesc();}vector offset;default{ moving_end() { offset = (target()- llGetPos()) * (ZERO_ROTATION / llGetRot()); llSitTarget(offset, ZERO_ROTATION); } state_entry() { llSetText("Return ( Dime )",<0,1,1>,1.0); offset = (target()- llGetPos()) * (ZERO_ROTATION / llGetRot()); llSetSitText("Teleport"); llSitTarget(offset, ZERO_ROTATION); } changed(integer change) { if (change & CHANGED_LINK) { llSleep(0.5); if (llAvatarOnSitTarget() != NULL_KEY) { llUnSit(llAvatarOnSitTarget()); } } } touch_start(integer i) { llSay(0, "Please right-click and select Teleport"); }} 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