FALSE/pt

From Second Life Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

integer FALSE = 0;

A constante FALSE, do tipo integer, armazena o valor 0

Constante de tipo integer (número inteiro) que armazena o valor ZERO.
  FALSE=0.

Usada em variáveis que representam valores booleanos.

Funções, Eventos & Constantes Relacionadas

Constantes

•  TRUE

Artigos

•  boolean

Exemplos

<lsl>integer bool; string boolStr; string BOOL_STR_FALSE = "FALSE (FALSO)"; string BOOL_STR_TRUE = "TRUE (VERDADEIRO)";

default{

   state_entry(){
       bool= TRUE;
       llSetText("Clique aqui para mudar o valor da variável booleana.",<1,1,1>,1);
   }
   touch_start(integer total_number) {
       if (bool){ // se bool é TRUE recebe FALSE
           bool = FALSE;
           boolStr = BOOL_STR_FALSE;
       }else{//senão recebe TRUE, pois é FALSE
           bool=TRUE;
           boolStr = BOOL_STR_TRUE;
       }
       string txt = "Você mudou o valor da variável booleana para "+ boolStr+"\nClique  para mudar novamente.";
       llSay(0,txt);
       llSetText(txt,<1,1,1>,1);
   }

} </lsl>