sDoor1 0 -1 -99 0 <undefined> <undefined> 1 603 7 0 0 -1 2 self 0 0 1 image_speed = 0; open = 0; block = instance_create(x - 8, y, oSolid1); block.image_yscale = 4; alarm[0] = 1; lock = 0; lockdelay = 0; showlock = 1; lockspr = sDoor1Locks; event = -1; highlight = 0; hltimer = 0; hlalpha = 0; stayopen = 0; alarm[2] = 10; 1 603 7 0 0 -1 2 self 0 0 1 if (instance_exists(block)) with (block) instance_destroy(); 1 603 7 0 0 -1 2 self 0 0 1 sfx_play_single(sndDoorUnlock); 1 603 7 0 0 -1 2 self 0 0 1 if (instance_exists(block) && open == true) with (block) instance_destroy(); alarm[2] = 30; 1 603 7 0 0 -1 2 self 0 0 1 if (open && stayopen == 0) { if (abs(oCharacter.x - x) > 20) { event_user(0); } else alarm[1] = 5; } 1 603 7 0 0 -1 2 self 0 0 1 if (collision_rectangle(x - 8, y, x + 8, y + 64, oCharacter, true, true)) event_user(2); if (event > 0) { if (global.event[event] > 0) { lock = 0; stayopen = 0; } } 1 603 7 0 0 -1 2 self 0 0 1 if (open == 1) { if (image_index < sprite_get_number(sprite_index) - 1) image_index += 0.5; } if (open == 0) { if (image_index > 0) { image_index -= 0.5; } else if (showlock == 0) { if (lockdelay > 0) { lockdelay -= 1; } else { showlock = 1; if (lock == 4) sfx_play_single(sndDoorLock); } } if (highlight) { hltimer += 0.15; if (hltimer > 99999999) hltimer = 0; hlalpha = abs(sin(hltimer)); if (hlalpha > 1) hlalpha = 1; } } 1 603 7 0 0 -1 2 self 0 0 1 if (open == 0) { if (lock == 0) { event_user(1); with (other) if (!wbeam) { event_user(0); instance_destroy(); } } else with (other) if (!wbeam) { event_user(1); instance_destroy(); } } 1 603 7 0 0 -1 2 self 0 0 1 if (open == 0 && (lock == 0 || lock == 1 || lock == 2 && other.smissile == 1)) event_user(1); 1 603 7 0 0 -1 2 self 0 0 1 if (open == 0 && (lock == 0 || lock == 3)) event_user(1); 1 603 7 0 0 -1 2 self 0 0 1 if (open == 0 && lock == 0) event_user(1); 1 603 7 0 0 -1 2 self 0 0 1 if (lock == 4) { lock = 0; highlight = 1; alarm[3] = 30; } 1 603 7 0 0 -1 2 self 0 0 1 if (instance_exists(block)) with (block) instance_destroy(); open = 1; image_index = sprite_get_number(sprite_index) - 1; alarm[1] = 1; 1 603 7 0 0 -1 2 self 0 0 1 if (instance_exists(block)) with (block) instance_destroy(); sfx_play(sndDoorOpen); open = 1; if (event > 0) { if (global.event[event] == 0) global.event[event] = 1; } 1 603 7 0 0 -1 2 self 0 0 1 if (open == 1) { block = instance_create(x - 8, y, oSolid1); block.image_yscale = 4; sfx_play_single(sndDoorClose); open = 0; lockdelay = 2; showlock = 0; } 1 603 7 0 0 -1 2 self 0 0 1 draw_self(); if (open == 0 && showlock == 1) { draw_sprite_ext(lockspr, lock, x, y, image_xscale, 1, 0, -1, 1); if (highlight) draw_sprite_ext(lockspr, 4, x, y, image_xscale, 1, 0, -1, hlalpha); } 0 0 0 0.5 0.100000001490116 0 0.100000001490116 0.100000001490116 0.200000002980232 -1 -1