colobot-data/ai/kill1.txt

19 lines
435 B
Plaintext
Raw Normal View History

2012-09-13 21:35:43 +00:00
extern void object::KillAnt1()
{
object item; // info. about object
goto(-30, 0); // go west
aim(0); // aim straight
while ( true ) // repeat forever:
{
item = radar(AlienAnt, 0, 360, 0, 40);
if ( item != null ) // ant detected ?
{
turn(direction(item.position));
fire(0.5); // shoot 0.5 s
}
wait(1); // wait 1 second
}
}