Code: Select all
walk()
{
if( bMoving )
{
move ...;
...
turn ...;
sleep 40;
}
if( bMoving )
{
turn ...;
...
turn ...;
sleep 40;
}
...
}
StartMoving()
{
bMoving = TRUE;
}
StopMoving()
{
bMoving = FALSE;
}
Or are they to make the script stop running the function "walk()" as soon as one of those cycles
Code: Select all
if( bMoving )
{
move ...;
...
turn ...;
sleep 40;
}
The MynnCom doesn't uses that, it uses:
Code: Select all
Walk()
{
if( TRUE )
{
move ...;
...
turn ...;
sleep 50;
if( TRUE )
{
move ...;
...
turn ...;
return (0);
}
}
}
Code: Select all
Walk()
{
move ...;
...
turn ...;
sleep 50;
if( TRUE )
move ...;
...
turn ...;
return (0);
}