<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
  <spriteName>sA4BlastDoorBottom</spriteName>
  <solid>0</solid>
  <visible>-1</visible>
  <depth>-90</depth>
  <persistent>0</persistent>
  <parentName>&lt;undefined&gt;</parentName>
  <maskName>&lt;undefined&gt;</maskName>
  <events>
    <event eventtype="0" enumb="0">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>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;
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="1" enumb="0">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>if (instance_exists(mysolid)) with (mysolid) instance_destroy();
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="3" enumb="0">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>targetx = oCharacter.x;
if (state == 0) {
    if (point_distance(x, y, targetx, y) &lt; 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 &amp;&amp; special &amp;&amp; global.event[203] &gt; 0 &amp;&amp; global.event[203] &lt; 9) with (oA4EscapeControl) event_user(0);
    if (fl_piston1 == 1) {
        if (pframe1 &lt; 2) pframe1 += 0.2;
    }
    if (fl_piston2 == 1) {
        if (pframe2 &lt; 2) pframe2 += 0.2;
    }
    if (fl_piston3 == 1) {
        if (pframe3 &lt; 2) pframe3 += 0.2;
    }
    if (fl_bolt == 1) {
        if (boff &lt; 8) boff += 0.5;
    }
    if (fl_clamp == 1) {
        if (coff &lt; 16) coff += 0.2;
    }
    if (fl_lock == 1) {
        if (lframe &lt; 4) {
            lframe += 0.5;
        } else lframe = 0;
    }
    if (fl_door == 1) {
        if (yoff &lt; 4) yoff += 0.1;
        if (yoff &gt;= 4 &amp;&amp; yoff &lt; 34) {
            if (yoff == 4) {
                if (instance_exists(mysolid)) with (mysolid) instance_destroy();
                sfx_play(sndA4DoorOpen);
            }
            yoff += 2;
        }
    }
    if (fl_door == 1 &amp;&amp; yoff &gt;= 34) {
        if (point_distance(x, y, targetx, y) &gt; 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 &gt; -1) pframe1 -= 0.2;
    }
    if (fl_piston2 == 0) {
        if (pframe2 &gt; -1) pframe2 -= 0.2;
    }
    if (fl_piston3 == 0) {
        if (pframe3 &gt; -1) pframe3 -= 0.2;
    }
    if (fl_bolt == 0) {
        if (boff &gt; 0) boff -= 0.5;
    }
    if (fl_clamp == 0) {
        if (coff &gt; 0) coff -= 0.5;
    }
    if (fl_door == 0) {
        if (yoff &gt; 0) yoff -= 4;
        event_user(0);
        if (yoff == 4) sfx_play(sndA4DoorClose);
    }
} // if (state == 2)
statetime += 1;
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="7" enumb="11">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>if (instance_exists(mysolid)) with (mysolid) instance_destroy();
instance_destroy();
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="7" enumb="10">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>if (!instance_exists(mysolid)) {
    mysolid = instance_create(x - 16, y - 64, oSolid1);
    mysolid.image_xscale = 2;
    mysolid.image_yscale = 4;
}
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="8" enumb="0">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>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 &gt;= 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 &gt;= 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 &gt;= 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);
}
</string>
          </argument>
        </arguments>
      </action>
    </event>
  </events>
  <PhysicsObject>0</PhysicsObject>
  <PhysicsObjectSensor>0</PhysicsObjectSensor>
  <PhysicsObjectShape>0</PhysicsObjectShape>
  <PhysicsObjectDensity>0.5</PhysicsObjectDensity>
  <PhysicsObjectRestitution>0.100000001490116</PhysicsObjectRestitution>
  <PhysicsObjectGroup>0</PhysicsObjectGroup>
  <PhysicsObjectLinearDamping>0.100000001490116</PhysicsObjectLinearDamping>
  <PhysicsObjectAngularDamping>0.100000001490116</PhysicsObjectAngularDamping>
  <PhysicsObjectFriction>0.200000002980232</PhysicsObjectFriction>
  <PhysicsObjectAwake>-1</PhysicsObjectAwake>
  <PhysicsObjectKinematic>-1</PhysicsObjectKinematic>
  <PhysicsShapePoints/>
</object>
