Get gameplay time

Returns the number of frames that have elapsed since the match started.

Syntax
get_gameplay_time;

Returns
int

Basic
// update.gml // spawns a built-in explosion hit fx at the player's x and y near the beginning of the match if (get_gameplay_time == 10) { spawn_hit_fx( x, y, 141 ); }

Advanced
// pre_draw.gml // draws a fire sprite behind the player that animates at 6 frames/second var fire_image = get_gameplay_time / 6; draw_sprite( sprite_get( fire_sprite ), fire_image, x, y );