Skip to main content

The "game_get_step" Function

Syntax#

game_get_step();
ArgumentTypeDescription
N/AN/ANo arguments

Description#

Returns the number of Steps that have been run for the entire current game session.

While it is not strictly required, this script will not have perfect accuracy without including obj_server_gmlp in the current project. The obj_server_gmlp object will automatically track any lost steps (i.e. dropped frames) that occur as a result of system lag, window dragging, and similar events, which will then be accounted for in this script.

Example#

if (is_even(game_get_step())) {
//Action on even Steps
} else {
//Action on odd Steps
}