脚本如下
if (GetTagBit("LED_start")==1)
{SetTagWord("LED_count",GetTagWord("LED_count")+1);
if (GetTagWord("LED_count")==3)
if (GetTagBit("LED_a")==0)
SetTagBit("LED_a",1);
if (GetTagWord("LED_count")==6)
if (GetTagBit("LED_b")==0)
SetTagBit("LED_b",1);
if (GetTagWord("LED_count")==9)
if (GetTagBit("LED_c")==0)
{ SetTagBit("LED_c",1);
SetTagWord("LED_count",0);
SetTagBit("LED_start",0);
}
}
if (GetTagBit("LED_stop")==1)
{SetTagWord("LED_count",GetTagWord("LED_count")+1);
if (GetTagWord("LED_count")==2)
if (GetTagBit("LED_c")==1)
SetTagBit("LED_c",0);
if (GetTagWord("LED_count")==4)
if (GetTagBit("LED_b")==1)
SetTagBit("LED_b",0);
if (GetTagWord("LED_count")==6)
if (GetTagBit("LED_a")==1)
{SetTagBit("LED_a",0);
SetTagWord("LED_count",0);
SetTagBit("LED_stop",0);
}
}
return 0;
这个脚本就是两个开关控制三盏灯顺序亮灭的脚本程序,但是不知道该怎么设置,我将这个脚本程序写在了c脚本的动作上,之后又在按钮编辑上的c动作又写了一遍,最后不能实现目的,还有就是不知道怎样定义无符号整数LED_count