Difference between revisions of "LlForceMouselook"

From Second Life Wiki
Jump to navigation Jump to search
(Stupid example is wrong, that is not how the function works.)
Line 4: Line 4:
|p1_type=integer
|p1_type=integer
|p1_name=mouselook
|p1_name=mouselook
|p1_desc=boolean, If {{LSLG|TRUE}} any avatar that sits on this object is forced into {{LSLG|mouselook}} mode.<br/>{{LSLG|FALSE}} undoes this setting.
|p1_desc=boolean, If [[TRUE]] any avatar that sits on tis forced into [[mouselook]] mode. [[FALSE]] undoes this setting.
|func_footnote
|func_footnote=If '''mouselook''' is [[TRUE]] then when an avatar sits upon the prim, the avatar will be forced into [[mouselook]] mode.<br/>[[FALSE]] is the default state and will not change the agents camera mode.<br/>A [[llSitTarget|sittarget]] is not necessary.
|func_desc=Sets if a sitting avatar should be forced into {{LSLG|mouselook}} mode upon sitting on the object.
|func_desc=Sets if a sitting avatar should be forced into [[mouselook]] when they sit on this prim.
|return_text
|return_text
|spec
|spec
|caveats=*The user may exit mouselook mode at any time.
|caveats=
**This can be detected by polling {{LSLG|llGetAgentInfo}}.
*This function has no effect on avatars already seated.
*The user may exit mouselook mode at any time.
**This can be detected by polling [[llGetAgentInfo]].
|constants
|constants
|examples=
|examples=
Line 19: Line 21:
     state_entry()
     state_entry()
     {
     {
         llSitTarget(<0,0,0.1>,ZERO_ROTATION); //needed for AvatarOnSitTarget to work. Vector values must not all be set to 0.
         llForceMouselook(TRUE);
    }
    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
     }
     }
}
}
</pre>
</pre>
|helpers
|helpers
|also_functions={{LSL DefineRow||{{LSLG|llAvatarOnSitTarget}}|}}
|also_functions={{LSL DefineRow||[[llAvatarOnSitTarget]]|}}
{{LSL DefineRow||{{LSLG|llGetAgentInfo}}|}}
{{LSL DefineRow||[[llGetAgentInfo]]|}}
{{LSL DefineRow||[[llSetCameraAtOffset]]|}}
{{LSL DefineRow||[[llSetCameraAtOffset]]|}}
{{LSL DefineRow||[[llSetCameraEyeOffset]]|}}
{{LSL DefineRow||[[llSetCameraEyeOffset]]|}}
Line 43: Line 39:
|cat2=Vehicle
|cat2=Vehicle
|cat3=Camera
|cat3=Camera
|cat4
|cat4=Prim
}}
}}

Revision as of 15:43, 17 November 2007

Summary

Function: llForceMouselook( integer mouselook );

Sets if a sitting avatar should be forced into mouselook when they sit on this prim.

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

If mouselook is TRUE then when an avatar sits upon the prim, the avatar will be forced into mouselook mode.
FALSE is the default state and will not change the agents camera mode.
A sittarget is not necessary.

Caveats

  • This function has no effect on avatars already seated.
  • The user may exit mouselook mode at any time.
All Issues ~ Search JIRA for related Bugs

Examples

Force Mouselook on Sit

default
{
    state_entry()
    {
        llForceMouselook(TRUE);
    }
}

See Also

Deep Notes

Search JIRA for related Issues

Signature

function void llForceMouselook( integer mouselook );