<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
  <spriteName>&lt;undefined&gt;</spriteName>
  <solid>0</solid>
  <visible>-1</visible>
  <depth>0</depth>
  <persistent>0</persistent>
  <parentName>&lt;undefined&gt;</parentName>
  <maskName>&lt;undefined&gt;</maskName>
  <events>
    <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>///Player Movement
if go
{
var i, move_check, h_spd, v_spd;
//Base speed vars
h_spd = 0;
v_spd = 0;
//Check keys
if keyboard_check(global.Up) v_spd -= spd;
if keyboard_check(global.Down) v_spd += spd;
if keyboard_check(global.Right) h_spd += spd;
if keyboard_check(global.Left) h_spd -= spd;
//Now move the instance "virtually" while checking for collisions
//First the horizontal check
for (i = abs(h_spd); i &gt; 0; i -= 1;)
    {
    move_check = sign(h_spd) * i;
    if !place_meeting(x + move_check, y, obj_Wall) {x += move_check; break;} //no collision on full speed so break the loop and move the instance
    if !place_meeting(x + move_check, y - i, obj_Wall) y -= (i / 2);
    if !place_meeting(x + move_check, y + i, obj_Wall) y += (i / 2);  
    }
//The vertical check
for (i = abs(v_spd); i &gt; 0; i -= 1;)
    {
    move_check = sign(v_spd) * i;
    if !place_meeting(x , y + move_check, obj_Wall) {y += move_check; break;}//no collision on full speed so break the loop and move the instance
    if !place_meeting(x - i,y + move_check, obj_Wall) x -= (i / 2);
    if !place_meeting(x + i,y + move_check, obj_Wall) x += (i / 2);
    }
//If we are moving, animate the legs and make footsteps...
if x = xprevious &amp;&amp; y = yprevious
    {
    //Stop animating the legs and stop footsteps
    f_index = 0;
    if !s_play audio_stop_sound(snd_Footsteps);
    s_play = true;
    }
else
    {
    //Animate the legs manually
    f_index += f_spd;
    if f_index &gt; 6.5 f_index = -0.5;
    if s_play
        {
        //Loop footsteps
        audio_play_sound(snd_Footsteps, 0, true);
        s_play = false;
        }
    }
//make character point towards mouse
var dd,ts;
dd = ((((point_direction(x,y,mouse_x,mouse_y) - h_angle) mod 360) + 540) mod 360) - 180; //get the head rotation
h_angle += min(abs(dd), 10) * sign(dd);  
dd = ((((h_angle - b_angle) mod 360) + 540) mod 360) - 180; // Get the body rotation
ts = abs(dd) / 6;
if abs(dd) &lt; ts b_angle = h_angle else b_angle += sign(dd) * ts;
}

//Update the player position for the AI
global.Player_x=x;
global.Player_y=y;



</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>0</PhysicsObjectKinematic>
  <PhysicsShapePoints/>
</object>
