关于state的启动与停止.
default
{
touch_start(integer num_detected) //when touched
{
state start; //go to state start
}
}
state start
{
state_entry() //state start has
{ //state start has
llSay(0,"You're in state entry"); //the firest real action
}
touch_start(integer num_detected) //when touched again
{
state default; //stop script,but when
}
state_exit() //script is over
{
llSay(0,"You stopped script"); //say this
}
}
这是标准的单击激活动作,很常用,再单击停止动作了.当然也可以把他扩展为点击变色,再点还原;点击变透明,再点还原;