Difference between revisions of "LlGetNumberOfSides"

From Second Life Wiki
Jump to navigation Jump to search
m (Replaced <source> with <syntaxhighlight>)
 
(6 intermediate revisions by 6 users not shown)
Line 9: Line 9:
|caveats
|caveats
|constants
|constants
|examples=<lsl>default
|examples=<syntaxhighlight lang="lsl2">default
{
{
     state_entry()
     state_entry()
Line 15: Line 15:
         // Set the hovertext to indicate the number of sides
         // Set the hovertext to indicate the number of sides
         integer numOfSides = llGetNumberOfSides();
         integer numOfSides = llGetNumberOfSides();
         llSetText( "I have " + (string)numOfSides + " sides." );
         llSetText( "I have " + (string)numOfSides + " sides.", <1,1,1>, 1 );
     }
     }
}</lsl>
}</syntaxhighlight>
|helpers
|helpers
|also_functions
|also_functions=
{{LSL DefineRow||[[llGetLinkNumberOfSides]]|Get number of faces for a linked prim}}
|also_tests
|also_tests
|also_events
|also_events

Latest revision as of 00:13, 11 October 2023

Summary

Function: integer llGetNumberOfSides( );

Returns an integer that is the number of faces (or sides) of the prim.

See Face for more information about faces and the conditions that control the number of faces a prim will have.

Examples

default
{
    state_entry()
    {
        // Set the hovertext to indicate the number of sides
        integer numOfSides = llGetNumberOfSides();
        llSetText( "I have " + (string)numOfSides + " sides.", <1,1,1>, 1 );
    }
}

See Also

Functions

•  llGetLinkNumberOfSides Get number of faces for a linked prim

Deep Notes

Search JIRA for related Issues

Signature

function integer llGetNumberOfSides();