Get the number of the first used slot in the robot storage.
none
The number of the first used storage slot or -1 if no slot is used in the robot.
// Listing #1: Display first used slot in robot storage.
Time <- 0;
function Voxel_Step()
{
local Slot, Msg;
// The robot will play at 100 ms interval.
if ( (GetGameTime() - Time) > 100 )
{
// Display the first used slot.
Slot = GetFirstUsedSlot();
if (Slot == -1) Msg = "NONE";
else Msg = Slot;
Display( "FIRST USED SLOT IN THE ROBOT : " + Msg , 1000, 4, 0);
// Store actual timestamp for the next 100 ms delay.
Time = GetGameTime();
}
}
none