sA4BlastDoorBottom 0 -1 -90 0 <undefined> <undefined> 1 603 7 0 0 -1 2 self 0 0 1 targetx = x; mysolid = -4; event_user(0); special = 0; state = 0; statetime = 0; yoff = 0; coff = 0; boff = 0; pframe1 = -1; pframe2 = -1; pframe3 = -1; lframe = 0; fl_door = 0; fl_clamp = 0; fl_bolt = 0; fl_piston1 = 0; fl_piston2 = 0; fl_piston3 = 0; fl_lock = 0; px = 5; py = -11; 1 603 7 0 0 -1 2 self 0 0 1 if (instance_exists(mysolid)) with (mysolid) instance_destroy(); 1 603 7 0 0 -1 2 self 0 0 1 targetx = oCharacter.x; if (state == 0) { if (point_distance(x, y, targetx, y) < 32) { state = 1; statetime = 0; } } if (state == 1) { if (statetime == 0) sfx_play(sndA4DoorInit); if (statetime == 60) { fl_piston1 = 1; sfx_play(sndA4DoorLock); } if (statetime == 90) { fl_piston2 = 1; sfx_play(sndA4DoorLock); } if (statetime == 120) { fl_piston3 = 1; sfx_play(sndA4DoorLock); } if (statetime == 180) { fl_bolt = 1; sfx_play(sndA4DoorBolt); } if (statetime == 210) fl_clamp = 1; if (statetime == 240) { fl_lock = 1; sfx_play(sndA4DoorRotor); } if (statetime == 300) { fl_door = 1; fl_lock = 0; } if (statetime == 310 && special && global.event[203] > 0 && global.event[203] < 9) with (oA4EscapeControl) event_user(0); if (fl_piston1 == 1) { if (pframe1 < 2) pframe1 += 0.2; } if (fl_piston2 == 1) { if (pframe2 < 2) pframe2 += 0.2; } if (fl_piston3 == 1) { if (pframe3 < 2) pframe3 += 0.2; } if (fl_bolt == 1) { if (boff < 8) boff += 0.5; } if (fl_clamp == 1) { if (coff < 16) coff += 0.2; } if (fl_lock == 1) { if (lframe < 4) { lframe += 0.5; } else lframe = 0; } if (fl_door == 1) { if (yoff < 4) yoff += 0.1; if (yoff >= 4 && yoff < 34) { if (yoff == 4) { if (instance_exists(mysolid)) with (mysolid) instance_destroy(); sfx_play(sndA4DoorOpen); } yoff += 2; } } if (fl_door == 1 && yoff >= 34) { if (point_distance(x, y, targetx, y) > 48) { state = 2; statetime = 0; } } } // if (state == 1) if (state == 2) { if (statetime == 0) { fl_door = 0; yoff = 32; } if (statetime == 15) { fl_piston1 = 0; fl_piston2 = 0; fl_piston3 = 0; } if (statetime == 10) fl_clamp = 0; if (statetime == 40) fl_bolt = 0; if (statetime == 60) { state = 0; statetime = -1; } if (fl_piston1 == 0) { if (pframe1 > -1) pframe1 -= 0.2; } if (fl_piston2 == 0) { if (pframe2 > -1) pframe2 -= 0.2; } if (fl_piston3 == 0) { if (pframe3 > -1) pframe3 -= 0.2; } if (fl_bolt == 0) { if (boff > 0) boff -= 0.5; } if (fl_clamp == 0) { if (coff > 0) coff -= 0.5; } if (fl_door == 0) { if (yoff > 0) yoff -= 4; event_user(0); if (yoff == 4) sfx_play(sndA4DoorClose); } } // if (state == 2) statetime += 1; 1 603 7 0 0 -1 2 self 0 0 1 if (instance_exists(mysolid)) with (mysolid) instance_destroy(); instance_destroy(); 1 603 7 0 0 -1 2 self 0 0 1 if (!instance_exists(mysolid)) { mysolid = instance_create(x - 16, y - 64, oSolid1); mysolid.image_xscale = 2; mysolid.image_yscale = 4; } 1 603 7 0 0 -1 2 self 0 0 1 draw_sprite(sA4BlastDoorBottom, -1, x, y + yoff); draw_sprite(sA4BlastDoorTop, -1, x, y - 64 - yoff); if (fl_lock) draw_sprite(sA4BlastDoorLock, lframe, x, y - 32); draw_sprite_ext(sA4BlastDoorClampLock, -1, x - 10, y + coff, 1, 1, 0, -1, 1); draw_sprite_ext(sA4BlastDoorClampLock, -1, x + 10, y + coff, 1, 1, 0, -1, 1); draw_sprite_ext(sA4BlastDoorClampLock, -1, x - 10, y - 64 - coff, 1, -1, 0, -1, 1); draw_sprite_ext(sA4BlastDoorClampLock, -1, x + 10, y - 64 - coff, 1, -1, 0, -1, 1); draw_sprite_ext(sA4BlastDoorBolt, -1, x - 10, y + boff, 1, 1, 0, -1, 1); draw_sprite_ext(sA4BlastDoorBolt, -1, x + 10, y + boff, 1, 1, 0, -1, 1); draw_sprite_ext(sA4BlastDoorBolt, -1, x - 10, y - 64 - boff, 1, -1, 0, -1, 1); draw_sprite_ext(sA4BlastDoorBolt, -1, x + 10, y - 64 - boff, 1, -1, 0, -1, 1); if (pframe1 >= 0) { draw_sprite_ext(sA4BlastDoorPiston, pframe1, x + 5, y - 23 + yoff, 1, 1, 0, -1, 1); draw_sprite_ext(sA4BlastDoorPiston, pframe1, x + 5, y - 44 - yoff, 1, 1, 0, -1, 1); draw_sprite_ext(sA4BlastDoorPiston, pframe1, x - 5, y - 23 + yoff, -1, 1, 0, -1, 1); draw_sprite_ext(sA4BlastDoorPiston, pframe1, x - 5, y - 44 - yoff, -1, 1, 0, -1, 1); } if (pframe2 >= 0) { draw_sprite_ext(sA4BlastDoorPiston, pframe2, x + 5, y - 17 + yoff, 1, 1, 0, -1, 1); draw_sprite_ext(sA4BlastDoorPiston, pframe2, x + 5, y - 50 - yoff, 1, 1, 0, -1, 1); draw_sprite_ext(sA4BlastDoorPiston, pframe2, x - 5, y - 17 + yoff, -1, 1, 0, -1, 1); draw_sprite_ext(sA4BlastDoorPiston, pframe2, x - 5, y - 50 - yoff, -1, 1, 0, -1, 1); } if (pframe3 >= 0) { draw_sprite_ext(sA4BlastDoorPiston, pframe3, x + 5, y - 11 + yoff, 1, 1, 0, -1, 1); draw_sprite_ext(sA4BlastDoorPiston, pframe3, x + 5, y - 56 - yoff, 1, 1, 0, -1, 1); draw_sprite_ext(sA4BlastDoorPiston, pframe3, x - 5, y - 11 + yoff, -1, 1, 0, -1, 1); draw_sprite_ext(sA4BlastDoorPiston, pframe3, x - 5, y - 56 - yoff, -1, 1, 0, -1, 1); } 0 0 0 0.5 0.100000001490116 0 0.100000001490116 0.100000001490116 0.200000002980232 -1 -1