string GetVoxelName(integer VoxelType)
Return the name of a VoxelType.
VoxelType : The Voxeltype on which you are querrying the name.
A string giving the name of the voxeltype.
// Listing #1: Voxel Analyser (Get info about voxel on top)
Time <- 0;
function Voxel_Step()
{
local VoxelType, VoxelName;
// The robot will play at 1 second interval.
if ( (GetGameTime() - Time) > 1000 )
{
// Look at the voxel on top of the robot and display it's voxeltype and voxel name.
VoxelType = Look(4);
VoxelName = GetVoxelName(VoxelType);
Display( "VOXEL ANALYSIS : (" + VoxelType + ") " + VoxelName, 900, 2);
// Store actual timestamp for the next 1 second delay.
Time = GetGameTime();
}
}
Look()
GetVoxelInfo()