diff --git a/scripts/article19_init.gml b/scripts/article19_init.gml new file mode 100644 index 0000000..5909246 --- /dev/null +++ b/scripts/article19_init.gml @@ -0,0 +1,11 @@ +//article19_init, Floor Supporter, By floralQuaFloral + +// visible = false; +sprite_index = sprite_get("projectile_supporter"); depth = -90000000; +image_xscale = 2; + +var repetitions = 0, par_block = asset_get("par_block"); +while repetitions < 100 && !place_meeting(x, y + 1, par_block) { + y++; +} +image_yscale = 4; //adds a bit of thickness to the floor just in case \ No newline at end of file diff --git a/scripts/article19_update.gml b/scripts/article19_update.gml new file mode 100644 index 0000000..957c63e --- /dev/null +++ b/scripts/article19_update.gml @@ -0,0 +1,3 @@ +//article19_update, Floor Supporter, By floralQuaFloral + +instance_destroy(); \ No newline at end of file diff --git a/scripts/load.gml b/scripts/load.gml index 770d768..a896740 100644 --- a/scripts/load.gml +++ b/scripts/load.gml @@ -15,6 +15,8 @@ sprite_change_offset("stall",27, 48); sprite_change_offset("marble_ground",-32, 0); sprite_change_offset("black",-32, 0); +sprite_change_offset("projectile_supporter", 1, 0); + //Need to set sprite collisions here! //Ouside Left sprite_change_collision_mask("g_ground",true,0,0,0,0,0,0); diff --git a/scripts/update.gml b/scripts/update.gml index 89997c0..8e14f08 100644 --- a/scripts/update.gml +++ b/scripts/update.gml @@ -45,6 +45,13 @@ if !_init { } if get_gameplay_time() == 3 with oPlayer { + //Fix Sylvanos's hitboxes (if we do this in other_init.gml, the game crashes??) + //Might as well do it here... + if url == CH_SYLVANOS { + set_hitbox_value(AT_NSPECIAL, 1, HG_PROJECTILE_GROUND_BEHAVIOR, 0); + set_hitbox_value(AT_FTILT, 1, HG_PROJECTILE_GROUND_BEHAVIOR, 0); + } + // if taunt_down { // with other { // debug = true; @@ -92,6 +99,23 @@ if !_init { //if taunt_held == 10 other.debug_console = !other.debug_console; } var wall_here; + + with pHitBox if type == 2 && grounds != 1 && vsp > 0 { //Make projectiles respond correctly to floors + //Save the old size & mask, then switch to the ones appropriate for collisons with terrain + var saved_mask = mask_index, saved_xscale = image_xscale, saved_yscale = image_yscale; + mask_index = (collision_sprite == 0)?sprite_index:collision_sprite; + image_xscale = 1; image_yscale = 1; + + //Check for collisions; if we're about to hit a floor then spawn a temporary rectangular floor + if place_meeting(x, y + vsp + 2, asset_get("par_block")) { + instance_create(floor(x + hsp), floor(y), "obj_stage_article_solid", 19); + } + + //Reset size and mask to normal values + image_xscale = saved_xscale; image_yscale = saved_yscale; mask_index = saved_mask; + } + + with oPlayer { //Fixes for various things due to article solids if god { invincible = true; diff --git a/sprites/articles/projectile_supporter.png b/sprites/articles/projectile_supporter.png new file mode 100644 index 0000000..b0b00c0 Binary files /dev/null and b/sprites/articles/projectile_supporter.png differ