Below is one of the programs that has been developed by our engineers.
It instructs a \l;grabber\u object\botgr; to retrieve the nearest chunk of \l;titanium ore\u object\titanore; and place it on the \l;converter\u object\convert;.
In order to execute this program, select the program \c;CollectTitanium1\n; in the list of the programs available on the bot (on the lower left-hand corner of your screen), and click on the arrow symbol \button 21;. At any moment you can stop the program and take over at the controls with the stop button \button 8;.
\c;
\s;extern void object::CollectTitanium1()
\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;}
\n;
\b;Archives
Index of the programs dispatched in former missions: