Get the Voxel quantity stored in the specified slot of the robot storage.
SlotNum : The slot number in the robot storage. The robot have 20 slots, so you can use the values 0 to 19.
The quantity of voxels stored in the specified slot or -1 if the specified slot didn't exist.
Put some voxels in the first slot of the robot inventory to display the quantity.
// Listing #1: Display the quantity in the first robot's storage slot.
Time <- 0; function Voxel_Step() { local VoxelType; // The robot will play at 100 ms interval. if ( (GetGameTime() - Time) > 100 ) { // Display the voxel quantity in the first used slot. VoxelType = GetSlot_Quantity(0); Display( "VOXEL QUANTITY IN THE FIRST SLOT : " + VoxelType , 1000, 4, 0); // Store actual timestamp for the next 100 ms delay. Time = GetGameTime(); } }
GetSlot_Type()