By George — February 11, 2018
Returns the x value of the specified instance. Used for referencing objects that you normally don’t have access to.
Argument | Type | Description |
---|
instance_id | :real | The ID of the instance to get the x value of |
Example, called from article1_update.gml:
with (asset_get( "plasma_field_obj" )) {
with (other.id) {
if (point_distance(
x + 10 * spr_dir,
y,
get_instance_x( other ),
get_instance_y( other )
) < 180) {
instance_destroy();
}
}
}
Categories: Functions, Programming, Workshop | Comments: 0
By George — February 11, 2018
Overwrites character’s victory background. Can be assigned to a 480x270px custom sprite using
sprite_get( sprite ) Reference→
or set to one of the ▼ following indexes
CH_ZETTERBURN
CH_ORCANE
CH_WRASTOR
CH_KRAGG
CH_FORSBURN
CH_MAYPUL
CH_ABSA
CH_ETALUS
CH_ORI
CH_RANNO
CH_CLAIREN
CH_SYLVANOS
CH_ELLIANA
CH_SHOVEL_KNIGHT
Argument | Type | Description |
---|
bg | :real | Victory background index or custom sprite ID |
Example, called from load.gml:
set_victory_bg( sprite_get( "custom" ));
Categories: Functions, Programming, Workshop | Comments: 0
By George — February 11, 2018
Returns the size of the specified part of the stage.
Argument | Type | Description |
---|
index | :real | The data to get |
▼ Indexes Reference
Index | Description |
---|
SD_X_POS | The x position of the left side of the main stage. Use room_width minus this value to get the x position of the right side of the stage |
SD_Y_POS | The y position of the top of the main stage |
SD_TOP_BLASTZONE | The distance between the top of the main stage and the top blastzone |
SD_BOTTOM_BLASTZONE | The distance between the top of the main stage and the bottom blastzone |
SD_SIDE_BLASTZONE | The distance between the left side of the main stage and the left blastzone. All stages are symmetrical in Rivals, so this works for both sides |
SD_WIDTH | The width of the main stage |
SD_ID | The unique ID for the stage. Returns -1 if the custom stage is not yet published to the workshop |
Example, called from update.gml:
var stage_x = get_stage_data( SD_X_POS );
if (x < stage_x || x > room_width - stage_x){
offstage_timer++;
} else {
offstage_timer = 0;
}
Categories: Functions, Programming, Workshop | Comments: 0
By George — February 11, 2018
Returns the number of frames remaining in the match.
Example, called from hit_player.gml:
if (get_game_timer() < 60 * 60) {
hit_player_obj.old_hsp *= 1.2;
hit_player.obj.old_vsp *= 1.2;
}
Categories: Functions, Programming, Workshop | Comments: 0
By George — February 11, 2018
Returns the number of frames since the match started.
Example, called from post_draw.gml:
if (on_fire) {
var fire_image = get_gameplay_time() / 6;
draw_sprite( fire_sprite, fire_image, x, y );
}
Categories: Functions, Programming, Workshop | Comments: 0