Running Low Level.
Switch [false]
Idle[()
{
if( self.key_pressed = 52)
{
if(Switch=false)
{
Switch=true;
}
if(Switch=true)
{
Switch=false;
}
}
}]
It will only tunr True 1 time. It wont do a simplr toggle to true / false.
PLs help.
![Razz :P](./images/smilies/icon_razz.gif)
The NOOB
Since the switch is false in the beginning it will first turn to true but immediately after that in the second if-thingie (now the switch is "true") it will turn back to false. Also it's good to have the self.ThinkTime there. What you need is something like:if(Switch=false)
{
Switch=true;
}
if(Switch=true)
{
Switch=false;
}
The "Switch = !Switch" thing should work too, i guess.Idle[()
{
self.ThinkTime = 0.1;
if( self.key_pressed = 52)
{
if(Switch=false)
{
Switch=true;
}
else
{
Switch=false;
}
}
}]