home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GameStar 2001 November
/
Gamestar_34_2001-11_cd1.bin
/
DEMA
/
colobotdemoe.exe
/
script
/
ant04.txt
< prev
next >
Wrap
Text File
|
2001-07-23
|
1KB
|
60 lines
extern void object::Attack( )
{
int list[], i;
object p;
float dist, prox;
point nav1, nav2, dest;
boolean advance = true;
errmode(0); // ne stoppe pas si erreur
while ( ismovie() != 0 ) wait(1);
i = 0;
list[i++] = WingedGrabber;
list[i++] = TrackedGrabber;
list[i++] = WheeledGrabber;
list[i++] = LeggedGrabber;
list[i++] = WingedShooter;
list[i++] = TrackedShooter;
list[i++] = WheeledShooter;
list[i++] = LeggedShooter;
list[i++] = WingedOrgaShooter;
list[i++] = TrackedOrgaShooter;
list[i++] = WheeledOrgaShooter;
list[i++] = LeggedOrgaShooter;
list[i++] = WingedSniffer;
list[i++] = TrackedSniffer;
list[i++] = WheeledSniffer;
list[i++] = LeggedSniffer;
list[i++] = Thumper;
list[i++] = PhazerShooter;
list[i++] = Recycler;
list[i++] = Shielder;
list[i++] = Subber;
list[i++] = Me;
nav1.x = cmdline(0);
nav1.y = cmdline(1);
nav2.x = cmdline(2);
nav2.y = cmdline(3);
while ( true )
{
while ( true )
{
p = radar(list, 0, 360, 0, 40);
if ( p == null ) break;
fire(p.position);
}
goto(nav1);
while ( true )
{
p = radar(list, 0, 360, 0, 40);
if ( p == null ) break;
fire(p.position);
}
goto(nav2);
}
}