LlPushObject
Looking for the current API? Open the llPushObject reference →
Wiki description
Applies
impulse and ang_impulse to object targetCaveats
- Only works on land where Push is not restricted or where the script is owned by the land owner.
- If the land is owned by a group, the scripted object must be deeded to the same group.
- In no-push areas an object can only push its owner or itself.
- The effectiveness of Push is modulated by the amount of script energy available.
- There is a simplified code snippet describing how Push is implemented in the Havok4 project and reveals some of the details of how the energy budget affects the final Push magnitude.
ang_impulseis ignored when applying to agents or their attachments.- Energy is fully depleted by this function when either
impulseorang_impulseis nonzero. Ifimpulseis nonzero, it will drain all energy in the object beforeang_impulseis processed, causing the push to be purely linear. - The push impact is diminished with distance by a factor of distance cubed.
Examples
// Pushes the collided object or avatar.
default
{
collision_start(integer num_detected)
{
llPushObject(llDetectedKey(0),<0,0,100>, <0,0,100>, TRUE);
}
}Shared wiki helpers
The original page also injects shared parameter notes, caveats or issue information through these helpers. Their conditional MediaWiki logic is not reproduced here; inspect the preserved helper source for additional material.
Original shared helper source (conditional wiki logic is not evaluated)
<noinclude>{{Multi-lang|category=LSL}}</noinclude>{{LSL Injection Test}}{{#if:
{{#vardefine:p_{{{1|none}}}_desc|{{#if:{{{pd|}}}|{{{pd|}}} }}{{#if:{{{group|1}}}|{{LSLGC|Group|group}}, }}{{LSLGC|Avatar|avatar}} or {{#if:{{{object|}}}|[[object]]|[[prim]]}} {{HoverLink|UUID|Universally Unique Identifier}} {{#if:{{{sim|}}}|that is in the same [[region]] {{#switch:{{{sim|}}}|*=|#default =  {{{sim|}}}}}
}}}}
{{#vardefine:p_{{{1|none}}}_hover|{{#if:{{{ph|}}}|{{{ph|}}} |{{#if:{{{pd|}}}|{{{pd|}}} }}}}{{#if:{{{group|1}}}|group, }}avatar or {{#if:{{{object|}}}|object|prim}} UUID {{#if:{{{sim|}}}|that is in the same region {{#switch:{{{sim|}}}|*=|#default =  {{{sim|}}}}}
}}}}
<includeonly>
{{#ifeq:{{#var:article-type}}|event||{{#if:{{#pos:{{#var:moded}}|r}}{{#pos:{{#var:moded}}|u}}||{{#vardefine:hidden-text|{{#var:hidden-text}}
{{LSLC|Avatar/As A Parameter}}
}}}}}}
</includeonly>
}}<noinclude>
{| {{Prettytable}}
|-{{Hl2}}
!var
!value
|-
|desc
|{{#var:p_{{{1|none}}}_desc}}
|-
|hover
|{{#var:p_{{{1|none}}}_hover}}
|}
</noinclude>Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.