home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GameStar 2001 November
/
Gamestar_34_2001-11_cd1.bin
/
PATCHE
/
colobotpatch17e.exe
/
english
/
script
/
tremot2b.txt
< prev
Wrap
Text File
|
2001-09-13
|
552b
|
36 lines
extern void object::Slave( )
{
float order, param;
while ( true )
{
// wait for order ...
while ( !testinfo("order", 100) )
{
wait(1);
}
// read the order and the parameter
order = receive("order", 100);
param = receive("param", 100);
if ( order == 1 )
{
message("move("+param+")");
move(param);
}
else if ( order == 2 )
{
message("turn("+param+")");
turn(param);
}
else
{
message("Unknown order");
}
// signal "end of work"
deleteinfo("order", 100);
}
}