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

    Description

    integer GetGametime()

    Return the game time in 1/1000s. This is the elapsed time from the start of the game you can use to do timing tasks.

    Parameters

    none

    Return Value

    An integer number giving the time in 1/1000s.

    Example of use

    // Listing #1: Bouncing clock
    Time <- 0; Flag_UpDown <- false; function Voxel_Step() { // The robot will play at 1 second interval. if ( (GetGameTime() - Time) > 1000 ) { // Display the actual time. Display( "GAME TIME : " + GetGameTime(), 500, 2); // Move the robot up and down following the 1 second rythm. if ( Flag_UpDown ) Move (4); else Move (5); Flag_UpDown = ! Flag_UpDown; // Store actual timestamp for the next 1 second delay. Time = GetGameTime(); } }

    See Also

    none

     
  2. Google+