Difference between revisions of "LlForceMouselook"

From Second Life Wiki
Jump to navigation Jump to search
m
m (Example whitespace, cat, & link style)
Line 24: Line 24:
     {
     {
         if (change & CHANGED_LINK) //event changed and it has to do with linking or avatar sitting
         if (change & CHANGED_LINK) //event changed and it has to do with linking or avatar sitting
        if (llAvatarOnSitTarget() != NULL_KEY) //the changed event is an avatar sitting
            if (llAvatarOnSitTarget() ) //the changed event is an avatar sitting
        llForceMouselook(TRUE); //force into mouselook on sit
                llForceMouselook(TRUE); //force into mouselook on sit
     }
     }
}
}
</pre>
</pre>
|helpers
|helpers
|also_functions=*{{LSLG|llAvatarOnSitTarget}}
|also_functions={{LSL DefineRow||{{LSLG|llAvatarOnSitTarget}}|}}
*{{LSLG|llGetAgentInfo}}
{{LSL DefineRow||{{LSLG|llGetAgentInfo}}|}}
|also_events
|also_events
|also_tests
|also_tests
Line 39: Line 38:
|permission
|permission
|negative_index
|negative_index
|cat1
|cat1=Sit
|cat2
|cat2
|cat3
|cat3
|cat4=Stub
|cat4
}}
}}

Revision as of 00:11, 26 February 2007

Summary

Function: llForceMouselook( integer <span title="boolean, If TRUE any avatar that sits on this object is forced into mouselook mode.
FALSE undoes this setting." style="border-bottom:1px dotted; cursor:help;">mouselook
);
0.0 Forced Delay
10.0 Energy

Sets if a sitting avatar should be forced into mouselook mode upon sitting on the object.

• integer mouselook boolean, If TRUE any avatar that sits on this object is forced into mouselook mode.
FALSE undoes this setting.

Caveats

  • The user may exit mouselook mode at any time.

Examples

Force Mouselook on Sit

default
{
    state_entry()
    {
        llSitTarget(<0,0,0.1>,ZERO_ROTATION); //needed for AvatarOnSitTarget to work. Vector values must not all be set to 0.
    }
    changed(integer change) //event changed
    {
        if (change & CHANGED_LINK) //event changed and it has to do with linking or avatar sitting
            if (llAvatarOnSitTarget() ) //the changed event is an avatar sitting
                llForceMouselook(TRUE); //force into mouselook on sit
    }
}

See Also

Functions

•  llAvatarOnSitTarget
•  llGetAgentInfo

Deep Notes

Signature

function void llForceMouselook( integer mouselook );