Intranet Catprocess
  1. news...
  2. about Blackvoxel
  3. download
  4. manual
  5. videos
  6. about us
  1. GetSlot_Type

    Description

    integer GetSlot_Type(integer SlotNum)

    Get the VoxelType stored in the specified slot in the robot storage.

    Parameters

    SlotNum : The slot number in the robot storage. The robot have 20 slots, so you can use the values 0 to 19.

    Return Value

    The VoxelType of the voxels stored in the specified slot or -1 if the specified slot didn't exist.

    Example of use

    Put some voxels in the first slot of the robot inventory to display it's voxeltype.

    // Listing #1: Display the VoxelType of 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 type in the first used slot. VoxelType = GetSlot_Type(0); Display( "VOXELTYPE IN THE FIRST SLOT : " + VoxelType , 1000, 4, 0); // Store actual timestamp for the next 100 ms delay. Time = GetGameTime(); } }

    See Also

    GetSlot_Quantity()

     
  2. Google+