home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Revista CD Expert 51
/
PCGamer51_17Demos.iso
/
games
/
colobotdemo
/
colobotdemo10e.exe
/
script
/
ANTsurp1.TXT
< prev
next >
Wrap
Text File
|
2001-06-10
|
1KB
|
49 lines
extern void object::Attack( )
{
int list[], i; // liste des objets cherchΘs
object target; // info sur la cible
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;
while (true)
{
while (radar(list, 0, 360, 0, 20) == null) wait(1);
move(5);
target = radar(list, 0, 360, 0, 40);
while (target != null)
{
fire(target.position);
target = radar(list, 0, 360, 0, 40);
}
turn(90 - orientation);
move(5);
turn(180);
}
}