<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
  <spriteName>sMeboid</spriteName>
  <solid>0</solid>
  <visible>-1</visible>
  <depth>-3</depth>
  <persistent>0</persistent>
  <parentName>oEnemy</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>action_inherited();
myhealth = 60;
damage = 35;
hitsound = sndEHit1;
deathsound = sndEDeath2;
platyoffset = -4;
frozenspr = sMeboidFrozen;
target = 0;
canattack = 1;
flipx = 1;
hitbeam = 0;
hitmissile = 0;
hitmissileexpl = 0;
hitpbomb = 0;
hitbomb = 0;
hitscrewattack = 0;
hitpseudoscrew = 0;
state = 0;
facing = 1;
stuntime = 5;
accelx = 0.05;
accely = 0.02;
maxspx = 2;
maxspy = 1;
targetx = x;
targety = y;
startx = x;
starty = y;
currtgt = 0;
for (i = 0; i &lt; 10; i += 1) {
    tgtx[i] = x;
    tgty[i] = y;
}
tgtx[1] = startx + 32;
tgty[1] = starty + random_range(-18, 18);
tgtx[2] = startx - 32;
tgty[2] = starty + random_range(-18, 18);
tgtx[3] = startx;
tgty[3] = starty + 1;
tgtx[4] = startx + 32;
tgty[4] = starty + random_range(-18, 18);
tgtx[5] = startx - 32;
tgty[5] = starty + random_range(-18, 18);
tgtx[6] = startx;
tgty[6] = starty;
CollisionTop = 0;
CollisionRight = 0;
CollisionLeft = 0;
CollisionBottom = 0;
shaking = 0;
sprite_index = sMeboidSpawn;
image_speed = 0.25;
candamage = 0; //want to drain health, so we disable normal attacks
</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>enemy_active_check(30);
enemy_target_check(120, 1);
CollisionTop = collision_line(x - 8, y - 7, x + 8, y - 7, oSolid, true, true);
if (CollisionTop == -4) CollisionTop = collision_line(x - 8, y - 7, x + 8, y - 7, oEnemySolid, true, true);
CollisionRight = collision_line(x + 9, y + 6, x + 9, y - 6, oSolid, true, true);
if (CollisionRight == -4) CollisionRight = collision_line(x + 9, y + 6, x + 9, y - 6, oEnemySolid, true, true);
CollisionLeft = collision_line(x - 9, y - 6, x - 9, y + 6, oSolid, true, true);
if (CollisionLeft == -4) CollisionLeft = collision_line(x - 9, y - 6, x - 9, y + 6, oEnemySolid, true, true);
CollisionBottom = collision_line(x - 8, y + 7, x + 8, y + 7, oSolid, true, true);
if (CollisionBottom == -4) CollisionBottom = collision_line(x - 8, y + 7, x + 8, y + 7, oEnemySolid, true, true);
if (active == 1 &amp;&amp; frozen == 0) {
    if (state == 0) {
        accelx = 0.02;
        accely = 0.02;
        maxspx = 0.6;
        maxspy = 0.5;
        if (point_distance(x, y, targetx, targety) &lt; 10) {
            currtgt += 1;
            if (tgtx[currtgt] == startx &amp;&amp; tgty[currtgt] == starty) currtgt = 0;
            targetx = tgtx[currtgt];
            targety = tgty[currtgt];
        }
        if (point_distance(x, y, oCharacter.x, oCharacter.y) &lt; 64 &amp;&amp; statetime &gt; 120) {
            state = 1;
            statetime = 0;
        }
    }
    if (state == 1) {
        accelx = 0.1;
        accely = 0.05;
        maxspx = 1.5;
        maxspy = 1;
        targetx = oCharacter.x;
        targety = oCharacter.y - 8;
        if (statetime &gt;= 300) {
            state = 0;
            statetime = 0;
        }
    }
    if (targetx &gt; x) hspeed += accelx;
    if (targetx &lt; x) hspeed -= accelx;
    if (targety &gt; y) vspeed += accely;
    if (targety &lt; y) vspeed -= accely;
    hspeed = min(hspeed, maxspx);
    hspeed = max(hspeed, -maxspx);
    vspeed = min(vspeed, maxspy);
    vspeed = max(vspeed, -maxspy);
    if (inwater) speed = 0.7;
    if (CollisionTop != 0) {
        if (instance_exists(CollisionTop)) {
            if (vspeed &lt; 0 &amp;&amp; CollisionTop.depth != 10) {
                vspeed *= -1;
                shaking = 1;
            }
        }
    }
    if (CollisionBottom != 0) {
        if (instance_exists(CollisionBottom)) {
            if (vspeed &gt; 0 &amp;&amp; CollisionBottom.depth != 10) {
                vspeed *= -1;
                shaking = 1;
            }
        }
    }
    if (CollisionLeft != 0) {
        if (instance_exists(CollisionLeft)) {
            if (hspeed &lt; 0 &amp;&amp; CollisionLeft.depth != 10) {
                hspeed *= -1;
                shaking = 1;
            }
        }
    }
    if (CollisionRight != 0) {
        if (instance_exists(CollisionRight)) {
            if (hspeed &gt; 0 &amp;&amp; CollisionRight.depth != 10) {
                hspeed *= -1;
                shaking = 1;
            }
        }
    }
    if (shaking &gt; 0) {
        image_speed = 1;
    } else if (image_speed &gt; 0.25) image_speed -= 0.05;
} else speed = 0; // if (active == 1 &amp;&amp; frozen == 0) else
if (state == 100) enemy_death();
if (shaking &gt; 0) shaking -= 1;
//if (image_alpha &lt; 1) image_alpha += 0.05;
event_inherited();
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="4" ename="oMissile">
      <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>event_inherited();
shaking = 30;
direction = other.direction;
speed = 2;
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="4" ename="oBeam">
      <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 (other.ibeam) {
    with (other) event_user(0);
    frz = instance_create(x, y, oEnemyFrozen);
    frz.image_xscale = facing;
    frz.sprite_index = frozenspr;
    frz.image_index = image_index;
    frz.mask_index = frozenspr;
    frz.image_angle = image_angle;
    frz.xVel = hspeed;
    frz.yVel = vspeed;
    frz.depth = 10;
    frz.falling = freezefall;
    
    // X respawn variable pass-through.
    frz.xSprite = sprite_index;
    frz.xLastFrame = image_index;
    frz.xLastFacing = image_xscale;
    frz.xLastAngle = image_angle;
    frz.xLastDepth = depth;
    frz.xLastXPos = xstart;
    frz.xLastYPos = ystart;
    frz.xLastEnemy = object_index;
    frz.canbeX = canbeX;
    frz.timer = timer;
    frz.rotspeed = rotspeed;
    frz.myspeed = myspeed;
    frz.offset = offset;
    frz.moveratio = moveratio;
    frz.movesteps = movesteps;
    
    PlaySoundMono(sndFreezeHit);
    
    instance_destroy();
} else with (other) event_user(1);
with (other) if (!pbeam) instance_destroy();
direction = other.direction;
speed = 2;
shaking = 30;
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="4" ename="oPBombExpl">
      <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>shaking = 60;
speed = 0;
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="4" ename="oBombExpl">
      <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>shaking = 10;
direction = 90;
speed = 2;
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="4" ename="oCharacter">
      <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>with (other) plantdrain = 2;
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="7" enumb="7">
      <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 (sprite_index == sMeboidSpawn) sprite_index = sMeboid;
</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>
