News

get_marker_y

Returns the Y position of a specified stage marker. Will return -1 if the marker is not found.

ArgumentTypeDescription
index:realThe index of the stage marker to find.

Example, called from a stage’s article1_update.gml:

//This code will destroy the article as soon as it goes below the specified marker.
if ( y >= get_marker_y( 6 ) ) {
instance_destroy();
}

get_marker_x

Returns the X position of a specified stage marker. Will return -1 if the marker is not found.

ArgumentTypeDescription
index:realThe index of the marker to find.

Example, called from a stage’s article1_update.gml:

//This will destroy the article as soon as it goes to the left of a specific marker.
if ( x <= get_marker_x( 6 ) ) {
instance_destroy();
}

get_match_setting

Returns a setting of the current match. This includes rule overrides by custom stages. If the rule override for time is set to 0 (disabling the timer), then SET_TIMER will still return the normal time setting.

ArgumentTypeDescription
setting:realThe match setting to check.

Indexes Reference

Example, called from a stage’s init.gml:

//This sets a wave amount for a custom game mode that overrides the normal timer.
waves_left = get_match_setting( SET_TIMER );

set_view_position

Overrides the camera position. Use the functions

view_get_xview()  Reference→
and

view_get_yview()  Reference→

for the arguments if you don’t want to override them. The camera will be restricted to the edges of the stage in base game stages, but will be fully unlocked on workshop stages.

ArgumentTypeDescription
x:realThe X coordinate to set the camera to
y:realThe Y coordinate to set the camera to

Example, called from animation.gml:

//This will focus the camera on the player if they trigger the purple kill effect when hitting another player, but not if they're hit themselves.
if (activated_kill_effect && state_cat != SC_HITSTUN ) {
set_view_position(x, y - (char_height / 2) );
}

end_match

Forces the match to end. All arguments are optional, and not providing any arguments will trigger overtime in the event of a tie. Any placements not supplied will be calculated normally. Use -1 in an argument if you want that placement to be skipped and calculated normally as well.

ArgumentTypeDescription
first:real[optional]
The winning player. Must be between 1 and 4.
second:real[optional]
The player in second place. Must be between 1 and 4.
third:real[optional]
The player in third place. Must be between 1 and 4.
fourth:real[optional]
The player in fourth place. Must be between 1 and 4.

Example, called from a stage’s article1_update.gml:

//This code will end the match as soon as a player touches the article, with the player who touched it automatically winning the match.
var touch = instance_place(x, y, oPlayer);
if touch != noone {
end_match( touch.player );
}