Difference between revisions of "LlGetNumberOfSides"

From Second Life Wiki
Jump to navigation Jump to search
(llSetText needs color vector and alpha as argument. didn't compile. changed to llOwnerSay)
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." );
         llOwnerSay( "I have " + (string)numOfSides + " sides." );
     }
     }
}</lsl>
}</lsl>

Revision as of 16:52, 9 January 2010

Summary

Function: integer llGetNumberOfSides( );
0.0 Forced Delay
10.0 Energy

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

<lsl>default {

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

Deep Notes

Signature

function integer llGetNumberOfSides();