colobot-data/help/mlsaari2.txt

32 lines
1.1 KiB
Plaintext

\b;Programs dispatched by Houston
Execute the program \c;KillAnt1\n; immediately on your \l;wheeled shooter\u object\botfr;, it will protect your west flank. Meantime you can elaborate your defense strategy.
\c;
\s;extern void object::KillAnt1()
\s;{
\s; \l;object\u cbot\type; item; // info. about object
\s;
\s; \l;goto\u cbot\goto;(-30, 0); // go west
\s; \l;aim\u cbot\aim;(0); // aim straight
\s;
\s; \l;while\u cbot\while; ( true ) // repeat forever:
\s; {
\s; item = \l;radar\u cbot\radar;(\l;AlienAnt\u cbot\category;, 0, 360, 0, 40);
\s; \l;if\u cbot\if; ( item != null ) // ant detected ?
\s; {
\s; \l;turn\u cbot\turn;(\l;direction\u cbot\direct;(item.position));
\s; \l;fire\u cbot\fire;(0.5); // shoot 0.5 s
\s; }
\s; \l;wait\u cbot\wait;(1); // wait 1 second
\s; }
\s;}
\n;
\b;Archives
Index of the programs dispatched in former missions:
o \c;\l;CollectTitanium2\u mlcrys2;\n;
o \c;\l;CollectTitanium1\u mlcrys1;\n;
o \c;\l;Recharge2\u mltropi3;\n;
o \c;\l;Recharge1\u mllune4;\n;
o \c;\l;SwitchCell1\u mllune1;\n;