This is a circular array, which is useful for having a fixed amount of elements, then writing over them later.
Say you want to have footprints in your game, but you only want a max of 1000 to be active. You can achieve this with the following:
/// Create Event
footprints = new CircularArray(1000);
/// Step Event
var decal = instance_create_layer(player.x, player.y, "Instances", obj_footstep);
var prev = footsteps.Push(decal);
// Remove old footprint
if (instance_exists(prev)) {
instance_destroy(prev);
}
The functionality provided can be found in the screenshot and example object.
End User Licence Agreement (EULA).
Renamed .yyp file