Difference between revisions of "LlGetNumberOfSides"

From Second Life Wiki
Jump to navigation Jump to search
 
m (Replaced <source> with <syntaxhighlight>)
 
(11 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{LSLFunctionAll|func_id=168|func_sleep=0.0|func_energy=10.0|func=llGetNumberOfSides|return_type=integer|func_footnote=Returns the number of sides|return_text|spec|caveats|examples|helpers|related|also|notes}}[[Category:LSL_Functions]][[Category:LSL_Stub]]
{{LSL_Function
|func_id=168|func_sleep=0.0|func_energy=10.0
|func=llGetNumberOfSides
|return_type=integer
|func_footnote=See {{LSLGC|Face}} for more information about faces and the conditions that control the number of faces a prim will have.
|func_desc
|return_text=that is the number of faces (or sides) of the prim.
|spec
|caveats
|constants
|examples=<syntaxhighlight lang="lsl2">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 );
    }
}</syntaxhighlight>
|helpers
|also_functions=
{{LSL DefineRow||[[llGetLinkNumberOfSides]]|Get number of faces for a linked prim}}
|also_tests
|also_events
|also_articles
|notes
|cat1=Face
|cat2
|cat3
|cat4
}}

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();