home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Revista CD Expert 51
/
PCGamer51_17Demos.iso
/
games
/
colobotdemo
/
colobotdemo10e.exe
/
script
/
tfollow2.txt
< prev
next >
Wrap
Text File
|
2001-06-10
|
631b
|
43 lines
extern void object::Hare( )
{
int nb = 0;
while ( true )
{
point dest;
float dist;
object bot;
do
{
dest.x = 8+rand()*24;
dest.y = -89.5+rand()*24;
dist = distance(dest, position);
}
while ( dist < 10 );
goto(dest);
wait(2);
bot = radar(PracticeBot, 0, 360, 0, 10);
if ( bot == null )
{
nb = 0;
message("RatΘ, trop loin. Recommence 10x ...");
}
else
{
nb ++;
if ( nb < 10 )
{
message("RΘussi, reste "+(10-nb)+"x");
}
else
{
message("Bravo, allons au garage !");
goto(-2, -77.5, 0);
break;
}
}
}
}