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