Difference between revisions of "User:Toy Wylie/RLV Documentation/setdebug avatarsex"

From Second Life Wiki
Jump to navigation Jump to search
 
(No difference)

Latest revision as of 07:28, 9 January 2011


@setdebug avatarsex

Type

General

Implemented

Implemented since RLV version 1.16

Usage

@setdebug_avatarsex:<-1/0/1>=force

Purpose

Sets the gender to report back to RLV aware scripts that use @getdebug_avatarsex. By default the official RLV implementation returns 0 (female), while other viewers might return values according to their avatar's shape. The following values are defined:
  • 0 - Female
  • 1 - Male
  • any other value - Gender unspecified
Since the shape might not reflect the actual reported gender (for very feminine boys or other kinds of bodies), and the value gets reset on editing appearance, it's probably the best to put this command in a slow timer, so the user's gender information gets updated regularly.


Example

<lsl>integer gender=0; // set this to 1 if you want to appear as male

default {

   on_rez(integer num)
   {
       llResetScript();
   }
   state_entry()
   {
       // set the gender value immediately after script start
       llSetTimerEvent(0.1);
   }
   timer()
   {
       // set the gender
       llOwnerSay("@setdebug_avatarsex:"+(string) gender+"=force");
       // next gender update in 60 seconds
       llSetTimerEvent(60.0);
   }
}</lsl>