home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Revista CD Expert 51
/
PCGamer51_17Demos.iso
/
games
/
colobotdemo
/
colobotdemo10e.exe
/
script
/
titan2.txt
< prev
next >
Wrap
Text File
|
2001-06-15
|
852b
|
25 lines
extern void object::CollectTitanium2()
{
// 1) Variable definition.
object item; // info. about objects
// 2) Goes toward the titanium ore and grabs it.
item = radar(TitaniumOre);// looks for titanium ore
goto(item.position); // goes to the position
grab(); // grabs the titanium
// 3) Goes toward the converter and drops it.
item = radar(Converter); // looks for converter
goto(item.position); // goes to the position
drop(); // drops the titanium
move(-2.5); // steps back 2.5 m
// 4) If power cell half empty, recharges.
if ( energyCell.energyLevel < 0.5 )
{ // if so:
item = radar(PowerStation); // looks for station
goto(item.position); // goes there
wait(5); // waits
}
}