llSitTarget
Revision as of 10:08, 28 April 2007 by Strife Onizuka (talk | contribs)
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: llSitTarget( vector offset, rotation rot );238 | Function ID |
0.0 | Forced Delay |
10.0 | Energy |
Set the sit location for this object (if offset == <0.0, 0.0, 0.0> clear it)
• vector | offset | |||
• rotation | rot |
Caveats
Examples
default { state_entry() { llSitTarget(<0.0, 0.0, 1.0>, ZERO_ROTATION); //The vector's components must not all be set to 0 for effect to take place. } }
Useful Snippets
UpdateSitTarget(vector pos, rotation rot) { key a = llAvatarOnSitTarget(); if(a) llSetLinkPrimitiveParams(GetAgentLinkNumber(a), [PRIM_POSITION, llGetLocalPos() + (pos * llGetLocalRot()), PRIM_ROTATION, rot *llGetLocalRot()]); llSitTarget(pos, rot); }//Written by Strife Onizuka integer GetAgentLinkNumber(key c) { integer a = -~llGetNumberOfPrims(); key b; if(a > 2) while(llGetAgentSize(b = llGetLinkKey(a = ~-a))) if(b == c) return a; return 0; }//Written by Strife Onizuka