News

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 );
}

user_event

Calls the scripts user_event0.gmluser_event15.gml from the mod’s scripts folder, within the context of the instance using this function and the script it’s used in.

ArgumentTypeDescription
num:realThe number of the user event script to run. Must be between 0 and 15.

Example, called from attack_update.gml:

//This code runs a custom event during certain points in USPECIAL and FSPECIAL. This could be things like building meter or activating a status effect, but really it's up to you.
if (attack == AT_USPECIAL && window == 2 && window_timer == 1) {
user_event( 2 );
}
if (attack == AT_FSPECIAL && window == 4 == window_timer == 1) {
user_event( 2 );
}

print_debug

Prints a custom message to the error log. The error log can be toggled by pressing Ctrl+F8 anywhere in the game.

ArgumentTypeDescription
message:stringThe message to print

Example, called from init.gml:

print_debug( “Hello, world!” );

suppress_stage_music

Temporarily suppresses the volume of the stage music on every frame this function is called, allowing custom characters to draw attention to special moves or animations. Once the function stops being called, the stage music will return to its original volume.

Both arguments are optional; by default, the stage music is suppressed to 25% volume.

ArgumentTypeDescription
volume:real[optional]
The target music volume, with a range of 0 to 1.
amount_per_frame:real[optional]
Determines how much the volume decrements or increments per frame, with a range of 0 to 1.

Example 1, called from animation.gml:

// suppress stage music to 25% volume at a rate of 0.01 per frame:
suppress_stage_music();

Example 2, called from animation.gml:

// suppress stage music to 50% volume at a rate of 0.005 per frame:
suppress_stage_music( 0.5, 0.005 );

is_laststock

Returns true if all active players have 1 stock remaining during a stock match.

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

// if everyone has 1 stock remaining, crossfade into laststock music:
if (is_laststock()) {
music_crossfade();
}