Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

////

// VARIABLES
////
stg_msk_x = 512;
stg_msk_y = 768;
scale = 1.0;
camera_boundary_l = 0;
camera_boundary_r = 1245 * scale;
camera_boundary_u = 0;
camera_boundary_d = 700 * scale;
camera_boundary_zoom = 292 * scale;
stg_x = camera_boundary_r * 0.5;
stg_y = camera_boundary_d;
death_l = camera_boundary_l - 100 * scale;
death_u = camera_boundary_u - 190 * scale;
death_r = camera_boundary_r + 100 * scale;
death_d = camera_boundary_d + 190 * scale;
player_spawn_x [ 0 ] = stg_x + ( 160 - stg_msk_x ) * scale;
player_spawn_y [ 0 ] = stg_y + ( 436 - stg_msk_y ) * scale;
player_spawn_x [ 1 ] = stg_x + ( 264 - stg_msk_x ) * scale;
player_spawn_y [ 1 ] = stg_y + ( 436 - stg_msk_y ) * scale;
player_spawn_x [ 2 ] = player_spawn_x [ 0 ] + ( player_spawn_x [ 1 ] -
player_spawn_x [ 0 ] ) * 0.15;
player_spawn_y [ 2 ] = stg_y + ( 338 - stg_msk_y ) * scale;
player_spawn_x [ 3 ] = player_spawn_x [ 0 ] + ( player_spawn_x [ 1 ] -
player_spawn_x [ 0 ] ) * 0.8;
player_spawn_y [ 3 ] = player_spawn_y [ 2 ];
player_spawn_x [ 4 ] = player_spawn_x [ 0 ] + ( player_spawn_x [ 1 ] -
player_spawn_x [ 0 ] ) * 0.45;
player_spawn_y [ 4 ] = stg_y + ( 552 - stg_msk_y ) * scale;
player_spawn_x [ 5 ] = player_spawn_x [ 0 ] + ( player_spawn_x [ 1 ] -
player_spawn_x [ 0 ] ) * 0.6;
player_spawn_y [ 5 ] = player_spawn_y [ 4 ];
respawn_x = stg_x + ( 476 - stg_msk_x ) * scale;
respawn_y = stg_y + ( 280 - stg_msk_y ) * scale;

////
// RESOURCES
////
// masks
global.msk_stg[0] = stage_msk_add2 (
"stage/training/mask_floor.png",1,1,0,stg_msk_x,stg_msk_y );
global.msk_stg[1] = stage_msk_add2 (
"stage/training/mask_leftwall.png",1,1,0,stg_msk_x,stg_msk_y );
global.msk_stg[2] = stage_msk_add2 (
"stage/training/mask_rightwall.png",1,1,0,stg_msk_x,stg_msk_y );
global.msk_stg[3] = stage_msk_add2 (
"stage/training/mask_platform.png",1,1,0,stg_msk_x,stg_msk_y );
global.msk_stg[4] = stage_msk_add2 (
"stage/training/mask_ceiling.png",1,1,0,stg_msk_x,stg_msk_y );
// stage sprites
global.msk_stg[5] = stage_spr_add (
"stage/training/fg.png",1,stg_msk_x,stg_msk_y );
// backgrounds
background_index[0] = stage_bg_add ( "stage/training/bg.png" );

////
// OBJECTS
////
var o;
// floor
o = instance_create ( stg_x , stg_y , obj_floor );
o.sprite_index = global.msk_stg[0];
o.image_xscale = scale;
o.image_yscale = scale;
// left wall
o = instance_create ( stg_x , stg_y , obj_leftwall );
o.sprite_index = global.msk_stg[1];
o.image_xscale = scale;
o.image_yscale = scale;
// right wall
o = instance_create ( stg_x , stg_y , obj_rightwall );
o.sprite_index = global.msk_stg[2];
o.image_xscale = scale;
o.image_yscale = scale;
// platform
o = instance_create ( stg_x , stg_y , obj_platform );
o.sprite_index = global.msk_stg[3];
o.image_xscale = scale;
o.image_yscale = scale;
// ceiling
o = instance_create ( stg_x , stg_y , obj_ceiling );
o.sprite_index = global.msk_stg[4];
o.image_xscale = scale;
o.image_yscale = scale;
// ledges
i = instance_create ( stg_x + ( 24 - stg_msk_x ) * scale , stg_y + ( 557 -
stg_msk_y ) * scale , obj_edge_left );
i.visible = 1;

// mg
o = instance_create ( stg_x , stg_y , obj_stage_extra );
o.sprite_index = global.msk_stg[5];
o.depth = 6;
o.image_xscale = scale;
o.image_yscale = scale;
obj_mg = o;
// hitbox
o = instance_create (0,0,obj_stage_bg);
o.mode = 500;
o.depth = -999;

stage_install_bg_object();
//obj_main_bg = obj_stage_bg.id;
with ( obj_stage_bg )
{
//mode = 0;
scale = other.scale;
obj_mg = other.obj_mg;
obj_fg = other.obj_fg;
stg_x = other.stg_x;
stg_y = other.stg_y;
}

You might also like