Difference between revisions of "PosJump"

From Second Life Wiki
Jump to navigation Jump to search
m
(I'm fine with Sei Lisa's revert to the earlier version of the page and just add a bigger warning at the top, but at least let's correctly classify it in Category:Obsolete Articles)
 
(13 intermediate revisions by 10 users not shown)
Line 1: Line 1:
{{LSL Tip|This page contains obsolete information and is kept only for historic purposes. The exploit that allowed this method to work was fixed in 2012. Use [[llSetRegionPos]] instead.}}
Here's an interesting method for bypassing the 10m limitation in Non-Physical movement. '''Be aware that IT WILL NOT WORK FOREVER, there are plans to fix this bug - for long-term use, rely on [[warpPos]].'''  Alternatives that offer the same functionality are being considered.  Until there's an alternative, this bug ''may'' be allowed to persist.  More information [http://jira.secondlife.com/browse/SVC-4089 here.]
Here's an interesting method for bypassing the 10m limitation in Non-Physical movement. '''Be aware that IT WILL NOT WORK FOREVER, there are plans to fix this bug - for long-term use, rely on [[warpPos]].'''  Alternatives that offer the same functionality are being considered.  Until there's an alternative, this bug ''may'' be allowed to persist.  More information [http://jira.secondlife.com/browse/SVC-4089 here.]


<lsl>
'''A replacement function ''[[llSetRegionPos]]()'' has been released and is now live grid-wide.'''
 
'''As of August 13th, 2012 there are already reported breakages of this function on some Channels.'''
 
<syntaxhighlight lang="lsl2">
posJump(vector target_pos)
posJump(vector target_pos)
{
{
Line 8: Line 14:
llSetLinkPrimitiveParamsFast(!!llGetLinkNumber(), [PRIM_POSITION, <1.304382E+19, 1.304382E+19, 0.0>, PRIM_POSITION, target_pos]);
llSetLinkPrimitiveParamsFast(!!llGetLinkNumber(), [PRIM_POSITION, <1.304382E+19, 1.304382E+19, 0.0>, PRIM_POSITION, target_pos]);
}
}
//switch LINK_ROOT by LINK_THIS if it's a single prim
//the !!llGetLinkNumber() thing is a little trick to always point to the root regardless of where the script is or whether the linkset got only one or more prims.
</lsl>
// If you are using a single prim object, you can substitute 0 or LINK_THIS. If it is a multiple prim object, you can substitute LINK_ROOT.
</syntaxhighlight>




If the target position turns out to be no-entry, your object will go offworld.  So Alias Turbo included a step that sends the object back to its starting position (just in case!) before trying the target position again.  So in the case that the target position is no-entry, it will either move 10m at most, or not at all.
If the target position turns out to be no-entry, your object will go offworld.  So Alias Turbo included a step that sends the object back to its starting position (just in case!) before trying the target position again.  So in the case that the target position is no-entry, it will either move 10m at most, or not at all.
<lsl>
<syntaxhighlight lang="lsl2">
safe_posJump(vector target_pos)
safe_posJump(vector target_pos)
{
{
Line 21: Line 28:
llSetLinkPrimitiveParamsFast(!!llGetLinkNumber(), [PRIM_POSITION, <1.304382E+19, 1.304382E+19, 0.0>, PRIM_POSITION, target_pos, PRIM_POSITION, start_pos, PRIM_POSITION, target_pos]);
llSetLinkPrimitiveParamsFast(!!llGetLinkNumber(), [PRIM_POSITION, <1.304382E+19, 1.304382E+19, 0.0>, PRIM_POSITION, target_pos, PRIM_POSITION, start_pos, PRIM_POSITION, target_pos]);
}
}
//switch LINK_ROOT by LINK_THIS if it's a single prim
//the !!llGetLinkNumber() thing is a little trick to always point to the root regardless of where the script is or whether the linkset got only one or more prims.
</lsl>
// If you are using a single prim object, you can substitute 0 or LINK_THIS. If it is a multiple prim object, you can substitute LINK_ROOT.
</syntaxhighlight>
[[Category:Obsolete Articles]]

Latest revision as of 12:18, 3 October 2022

KBcaution.png Important: This page contains obsolete information and is kept only for historic purposes. The exploit that allowed this method to work was fixed in 2012. Use llSetRegionPos instead.

Here's an interesting method for bypassing the 10m limitation in Non-Physical movement. Be aware that IT WILL NOT WORK FOREVER, there are plans to fix this bug - for long-term use, rely on warpPos. Alternatives that offer the same functionality are being considered. Until there's an alternative, this bug may be allowed to persist. More information here.

A replacement function llSetRegionPos() has been released and is now live grid-wide.

As of August 13th, 2012 there are already reported breakages of this function on some Channels.

posJump(vector target_pos)
{
// An alternative to the warpPos trick without all the overhead.
// Trickery discovered by Uchi Desmoulins and Gonta Maltz.  More exact value provided by Fake Fitzgerald.
	llSetLinkPrimitiveParamsFast(!!llGetLinkNumber(), [PRIM_POSITION, <1.304382E+19, 1.304382E+19, 0.0>, PRIM_POSITION, target_pos]);
}
//the !!llGetLinkNumber() thing is a little trick to always point to the root regardless of where the script is or whether the linkset got only one or more prims.
// If you are using a single prim object, you can substitute 0 or LINK_THIS. If it is a multiple prim object, you can substitute LINK_ROOT.


If the target position turns out to be no-entry, your object will go offworld. So Alias Turbo included a step that sends the object back to its starting position (just in case!) before trying the target position again. So in the case that the target position is no-entry, it will either move 10m at most, or not at all.

safe_posJump(vector target_pos)
{
// An alternative to the warpPos trick without all the overhead.
// Trickery discovered by Uchi Desmoulins and Gonta Maltz.  More exact value provided by Fake Fitzgerald.  Safe movement modification provided by Alias Turbo.
      vector start_pos = llGetPos();
	llSetLinkPrimitiveParamsFast(!!llGetLinkNumber(), [PRIM_POSITION, <1.304382E+19, 1.304382E+19, 0.0>, PRIM_POSITION, target_pos, PRIM_POSITION, start_pos, PRIM_POSITION, target_pos]);
}
//the !!llGetLinkNumber() thing is a little trick to always point to the root regardless of where the script is or whether the linkset got only one or more prims.
// If you are using a single prim object, you can substitute 0 or LINK_THIS. If it is a multiple prim object, you can substitute LINK_ROOT.