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

    Description

    [various] GetVoxelProp(integer VoxelType, integer InfoNum)

    Return informations about voxeltypes.

    Parameters

    VoxelType : The Voxeltype on which you are querrying infos.

    InfoNum : The type of the information you are querrying:

    • 0 : (Return boolean) Return true if the voxel is non solid and robot can go over it or place voxel at it's location.
    • 1 : (Return boolean) Return true if the voxel supports the voxel_input interface and can accept voxels you give it with the function PushVoxelTo().
    • 2 : (Return boolean) Return true if the voxel supports the voxel_output interface and can give you some voxels on request with the function PullVoxelFrom().

    Return Value

    The response to your querry. Type and value depends on the question parameter InfoNum

    Example of use

    // Listing #1: Get info about voxel on top of the robot.
    Time <- 0; function Voxel_Step() { local VoxelType, Info, DisplayResponse; // The robot will play at 1 second interval. if ( (GetGameTime() - Time) > 1000 ) { // Look at the voxel on top of the robot and display infos about it. VoxelType = Look(4); Info = GetVoxelProp(VoxelType,0); DisplayResponse = (Info) ? "YES" : "NO"; Display( "VOXEL ON TOP IS NONSOLID : " + DisplayResponse, 900, 2); // Store actual timestamp for the next 1 second delay. Time = GetGameTime(); } }

    See Also

    Look()
    GetVoxelName()

     
  2. Google+