These are all of the functions you can use in your scripts.
Available Common GML Functions
- Real number functions
- Strings-related functions
- place_meeting( x, y, object ) Reference→
- position_meeting( x, y, object ) Reference→
- point_distance( x1, y1, x2, y2 ) Reference→
- instance_place( x, y, object ) Reference→
- instance_position( x, y, object ) Reference→
- instance_nearest( x, y, object ) Reference→
- instance_furthest( x, y, object ) Reference→
- instance_number( object ) Reference→
- instance_exists( object ) Reference→
- instance_find( object, number ) Reference→
- instance_create( x, y, object ) Reference→
- instance_destroy( ID ) Reference→
- draw_sprite( sprite, subimage, x, y ) Reference→
- draw_sprite_ext( sprite, subimage, x, y, xscale, yscale, rotation, color, alpha ) Reference→
- get_string( str, def ) Reference→
General Functions
-
- asset_get( asset ) Reference→
- draw_debug_text( x, y, text ) Reference→
- trigger_b_reverse() Reference→
- random_func( index, high_value, floored ) Reference→
- random_func_2( index, high_value, floored ) Reference→
- attack_end() Reference→
- get_state_name( state ) Reference→
- set_state( state ) Reference→
- set_attack( attack ) Reference→
- iasa_script() Reference→
- clear_button_buffer( input_index ) Reference→
- can_tap_jump() Reference→
- is_special_pressed( dir ) Reference→
- hit_fx_create( sprite_index, animation_length ) Reference→
- spawn_hit_fx( x, y, hit_fx_index ) Reference→
- spawn_dust_fx( x, y, sprite_index, length ) Reference→
- get_gameplay_time() Reference→
- get_game_timer() Reference→
- get_stage_data( index ) Reference→
- set_victory_bg( bg ) Reference→
- set_ui_element( type, value ) Reference→
- get_instance_x( instance_id ) Reference→
- get_instance_y( instance_id ) Reference→
- get_instance_player( instance_id ) Reference→
- get_instance_player_id( instance_id ) Reference→
- get_training_cpu_action() Reference→
- print_debug( text ) Reference→
- get_synced_var( player ) Reference→
- set_synced_var( player, value ) Reference→
- user_event( num ) Reference→
Player-related Functions
- get_char_info( player, info ) Reference→
- get_player_team( player ) Reference→
- set_player_team( player, value ) Reference→
- get_player_stocks( player ) Reference→
- set_player_stocks( player, value ) Reference→
- get_player_color( player ) Reference→
- get_player_damage( player ) Reference→
- set_player_damage( player, value ) Reference→
- take_damage( damaged_player, attacking_player, damage ) Reference→
- is_laststock() Reference→
- is_player_on( player ) Reference→
- get_player_hud_color( player ) Reference→
- has_rune( letter ) Reference→
Sprite Functions
- sprite_get( sprite ) Reference→
- sprite_change_offset( sprite, xoff, yoff ) Reference→
- sprite_change_collision_mask( sprite, sepmasks, bboxmode, bbleft, bbtop, bbright, bbbottom, kind ) Reference→
- set_hit_particle_sprite( num, sprite_index) Reference→
- set_victory_portrait( sprite ) Reference→
- set_victory_sidebar( sprite ) Reference→
Sound Functions
- sound_get( sound ) Reference→
- sound_play( sound ) Reference→
- sound_stop( sound ) Reference→
- set_victory_theme( sound ) Reference→
- suppress_stage_music() Reference→
View Functions
- view_get_wview() Reference→
- view_get_hview() Reference→
- view_get_xview() Reference→
- view_get_yview() Reference→
- set_view_position( x, y ) Reference→
- shake_camera( amount, time ) Reference→
Custom Colors Functions
- set_num_palettes( num ) Reference→
- set_color_profile_slot( color_slot, shade_slot, R, G, B ) Reference→
- set_color_profile_slot_range( color_slot, H, S, V ) Reference→
- get_color_profile_slot_r( color_slot, shade_slot ) Reference→
- get_color_profile_slot_g( color_slot, shade_slot ) Reference→
- get_color_profile_slot_b( color_slot, shade_slot ) Reference→
- set_character_color_slot( shade_slot, R, G, B ) Reference→
- set_article_color_slot( shade_slot, R, G, B ) Reference→
- set_character_color_shading( shade_slot, value ) Reference→
Shader Functions
- shader_start() Reference→
- shader_end() Reference→
- init_shader() Reference→
Attack/Hitbox Grid Functions
- get_attack_value( attack, index ) Reference→
- set_attack_value( attack, index, value ) Reference→
- reset_attack_value( attack, index ) Reference→
- get_window_value( attack, window, index ) Reference→
- set_window_value( attack, window, index, value ) Reference→
- reset_window_value( attack, window, index ) Reference→
- get_hitbox_value( attack, hitbox, index ) Reference→
- set_hitbox_value( attack, hitbox, index, value ) Reference→
- reset_hitbox_value( attack, hitbox, index ) Reference→
- get_num_hitboxes( attack ) Reference→
- set_num_hitboxes( attack, value ) Reference→
- reset_num_hitboxes( attack ) Reference→
- destroy_hitboxes() Reference→
- get_hitbox_angle( hitbox_id ) Reference→
- get_kb_formula( damage, kb_adj, kb_mult, hbox_damage, hbox_bkb, hbox_kb_scale ) Reference→
- get_hitstun_formula( damage, kb_adj, kb_mult, hbox_damage, hbox_bkb, hbox_kb_scale ) Reference→
- get_hitstop_formula( damage, hbox_damage, hbox_hitstop, hbox_hitstop_scale, hbox_extra_hitstop ) Reference→
- create_hitbox( attack, hitbox_num, x, y ) Reference→
- create_deathbox( x, y, w, h, player, free, shape, lifespan, bg_type ) Reference→
Stage Scripting Functions
- end_match() Reference→
- get_match_setting( setting ) Reference→
- get_marker_x( num ) Reference→
- get_marker_y( num ) Reference→
- is_aether_stage() Reference→
- get_article_script( instance_id ) Reference→
- music_play_file( file ) Reference→
- music_stop() Reference→
- music_set_volume( volume ) Reference→
- music_fade() Reference→
- music_crossfade() Reference→
- get_bg_data( layer, data ) Reference→
- set_bg_data( layer, data, value ) Reference→
Easing Functions
Interpolates between start and end over the total time with current time being your current position in the interpolation. This website can help to understand the effect of each function.
- ease_linear( start, end, current time, total time )
- ease_backIn( start, end, current time, total time, overshoot )
- ease_backOut( start, end, current time, total time, overshoot )
- ease_backInOut( start, end, current time, total time, overshoot )
- ease_bounceIn( start, end, current time, total time )
- ease_bounceInOut( start, end, current time, total time )
- ease_circIn( start, end, current time, total time )
- ease_circOut( start, end, current time, total time )
- ease_circInOut( start, end, current time, total time )
- ease_cubeIn( start, end, current time, total time )
- ease_cubeOut( start, end, current time, total time )
- ease_cubeInOut( start, end, current time, total time )
- ease_expoIn( start, end, current time, total time )
- ease_expoOut( start, end, current time, total time )
- ease_expoInOut( start, end, current time, total time )
- ease_quadIn( start, end, current time, total time )
- ease_quadOut( start, end, current time, total time )
- ease_quadInOut( start, end, current time, total time )
- ease_quartIn( start, end, current time, total time )
- ease_quartOut( start, end, current time, total time )
- ease_quartInOut( start, end, current time, total time )
- ease_sineIn( start, end, current time, total time )
- ease_sineOut( start, end, current time, total time )
- ease_sineInOut( start, end, current time, total time )