Can someone explain to me why this snppet wont turn on then off ?
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.
The NOOB
Toggle on/off Low Level
been awhile since i used simkin, but are you looping the idle function? ie
Switch [false]
Idle[()
{
if( self.key_pressed = 52)
{
if(Switch=false)
{
Switch=true;
}
if(Switch=true)
{
Switch=false;
}
}
RestartOrder();
}]
also, try this: instead of if switch is true make it false blah blah try:
Switch = !Switch;
Switch [false]
Idle[()
{
if( self.key_pressed = 52)
{
if(Switch=false)
{
Switch=true;
}
if(Switch=true)
{
Switch=false;
}
}
RestartOrder();
}]
also, try this: instead of if switch is true make it false blah blah try:
Switch = !Switch;
RF2 site: http://realityfactory2.sourceforge.net/
RF2 tasks: http://sourceforge.net/pm/?group_id=179085
RF2 tasks: http://sourceforge.net/pm/?group_id=179085
That RestartOrder() isn't needed there... it is actually a highlevel command.
I think the problem is this:
I think the problem is this:
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;
}
}
}]
Pain is only psychological.
That's what I was thinking but I didn't know for sure so I kept my mouth shut.
Jonas
Focused, hard work is the real key to success. Keep your eyes on the goal, and just keep taking the next step towards completing it. If you aren't sure which way to do something, do it both ways and see which works better. - John Carmack
Focused, hard work is the real key to success. Keep your eyes on the goal, and just keep taking the next step towards completing it. If you aren't sure which way to do something, do it both ways and see which works better. - John Carmack
ah. sorry. i know too little about simkin.
RF2 site: http://realityfactory2.sourceforge.net/
RF2 tasks: http://sourceforge.net/pm/?group_id=179085
RF2 tasks: http://sourceforge.net/pm/?group_id=179085