Below is one of the programs that has been developed by our engineers.
An upgrade on the previous program: the \l;grabber\u object\botgr;, on its way back from the converter, makes a stop, if necessary, at the \l;power station\u object\station; to recharge its power cell.
This program also works on \l;winged grabbers\u object\botgj;, if the \l;derrick\u object\derrick; is on another island than the \l;converter\u object\convert;.
\c;
\s;extern void object::CollectTitanium2()
\s;{
\s; // 1) Variable definition.
\s; \l;object\u cbot\type; item; // info. about objects
\s;
\s; // 2) Goes toward the titanium ore and grabs it.
\s; item = \l;radar\u cbot\radar;(\l;TitaniumOre\u cbot\category;);// looks for titanium ore
\s; \l;goto\u cbot\goto;(item.position); // goes to the position
\s; \l;grab\u cbot\grab;(); // grabs the titanium
\s;
\s; // 3) Goes toward the converter and drops it.
\s; item = \l;radar\u cbot\radar;(\l;Converter\u cbot\category;); // looks for converter
\s; \l;goto\u cbot\goto;(item.position); // goes to the position
\s; \l;drop\u cbot\drop;(); // drops the titanium
\s; \l;move\u cbot\move;(-2.5); // steps back 2.5 m
\s;
\s; // 4) If power cell half empty, recharges.
\s; if ( energyCell.energyLevel < 0.5 )
\s; { // if so:
\s; item = \l;radar\u cbot\radar;(\l;PowerStation\u cbot\category;); // looks for station
\s; \l;goto\u cbot\goto;(item.position); // goes there
\s; \l;wait\u cbot\wait;(5); // waits
\s; }
\s;}
\n;
\b;Archives
Index of the programs dispatched in former missions: