Difference between revisions of "LlForceMouselook"
Jump to navigation
Jump to search
Mako Nozaki (talk | contribs) m |
Fred Gandt (talk | contribs) m |
||
Line 4: | Line 4: | ||
|p1_type=integer | |p1_type=integer | ||
|p1_name=mouselook | |p1_name=mouselook | ||
|p1_desc=boolean, if [[TRUE]] | |p1_desc=boolean, if [[TRUE]] when an avatar sits on the prim, the avatar will be forced into [[mouselook]] mode. [[FALSE]] is the default setting and will undo a previously set [[TRUE]] or do nothing. | ||
|func_footnote=A [[llSitTarget|sit target]] is not necessary for this function to work. | |func_footnote=A [[llSitTarget|sit target]] is not necessary for this function to work. | ||
Line 23: | Line 23: | ||
state_entry() | state_entry() | ||
{ | { | ||
llForceMouselook(TRUE); | llForceMouselook(TRUE); // Forces sitting avatars into mouselook. | ||
llForceMouselook(FALSE); // Reverts the setting to the default... | |||
// ...as with a newly created prim. | |||
} | } | ||
}</lsl> | }</lsl> |
Revision as of 04:15, 3 May 2010
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: llForceMouselook( integer mouselook );0.0 | Forced Delay |
10.0 | Energy |
Sets if a sitting avatar should be forced into mouselook when they sit on this prim.
• integer | mouselook | – | boolean, if TRUE when an avatar sits on the prim, the avatar will be forced into mouselook mode. FALSE is the default setting and will undo a previously set TRUE or do nothing. |
A sit target is not necessary for this function to work.
If the function is used in an attachment (like a HUD), then the wearer is not forced into Mouselook mode. Rather, a button appears at the bottom of the screen, and the wearer must click it to enter Mouselook. This is similar to what happens when CONTROL_ML_LBUTTON is captured with llTakeControls.
Caveats
- 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.
- There is nothing stopping someone from modifying or making a client that ignores this.
Examples
Force Mouselook on Sit <lsl>default {
state_entry() { llForceMouselook(TRUE); // Forces sitting avatars into mouselook.
llForceMouselook(FALSE); // Reverts the setting to the default... // ...as with a newly created prim. }}</lsl>
See Also
Functions
• | llAvatarOnSitTarget | |||
• | llGetAgentInfo | |||
• | llSetCameraAtOffset | |||
• | llSetCameraEyeOffset |