flag=!flag;
Nice and simple. :)
A code example:
integer flag=0;
default
{
state_entry()
{
llSay(0, "Hello, Avatar!");
}
touch_start(integer total_number)
{
if(flag)
{
//flag is set
llSay(0,"Flag is Set");
}
else
{
llSay(0,"Flag is not set.");
}
flag=!flag; //toggle
}
}
No comments:
Post a Comment