<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
  <spriteName>sprSpaceBoxBack</spriteName>
  <solid>0</solid>
  <visible>0</visible>
  <depth>-1000000</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>
pl = 1
hp_actual = global.s_hp[pl];
pp_actual = global.s_pp[pl];

dead = 0
paused = 0
image_speed = 1/4
image_index = 0

//You can display overlays above the health boxes for a more animated battle system!
overlay = sprNull
overlay_image_index = 0
overlay_image_speed = 0
overlay2 = sprNull
overlay2_image_index = 0
overlay2_image_speed = 0

if room != rmBattle {
    depth = -10000000
}

alarm[0] = 8
alarm[1] = 1
alarm[3] = 1
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="2" enumb="3">
      <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>///PP Roll
if !global.nohproll {
    if (pp_actual &gt; global.s_pp[pl]) {
        pp_actual -=0.25
    } else if (pp_actual &lt; global.s_pp[pl]) {
        pp_actual +=0.25
    }
}

alarm[3] = 3
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="2" enumb="2">
      <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>///Blinking (store)
if image_blend = c_white { image_blend = c_gray }
else { image_blend = c_white }

alarm[2] = room_speed / 6
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="2" enumb="1">
      <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>///Set positions and create ailments bubble
global.healthbar[pl] = id;
hp_actual = global.s_hp[pl];
pp_actual = global.s_pp[pl];

status = instance_create(x+32,y-12,objAilmentsBubble)
status.pl = pl

if global.pl_count = 1 {
    x = view_xview+view_wview/2-28
} else if global.pl_count = 2 {
    switch pl {
        case 1:
            x = view_xview+view_wview/2-56
            break;
        case 2:
            x = view_xview+view_wview/2
            break;
    }
} else if global.pl_count = 3 {
    switch pl {
        case 1:
            x = view_xview+view_wview/2-84
            break;
        case 2:
            x = view_xview+view_wview/2-28
            break;
        case 3:
            x = view_xview+view_wview/2+28
            break;
    }
} else {
    switch pl {
        case 1:
            x = view_xview+view_wview/2-112
            break;
        case 2:
            x = view_xview+view_wview/2-56
            break;
        case 3:
            x = view_xview+view_wview/2
            break;
        case 4:
            x = view_xview+view_wview/2+56
            break;
    }
}

visible = !(pl &gt; global.pl_count)

xstart = x
ystart = y
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="2" 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>///HP Roll
var inc = 0;
if !global.nohproll {
    if (hp_actual &gt; global.s_hp[pl]) {
        hp_actual -=0.25
        inc = 0
    } else if (hp_actual &lt; global.s_hp[pl]) {
        hp_actual +=0.25
        inc = 1
    }
    
    if status.pl != pl {status.pl = pl;}
}

alarm[0] = 3*iff(inc,1,global.s_guard[pl])
</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>///Animate overlays
overlay_image_index += overlay_image_speed
overlay2_image_index += overlay2_image_speed
</string>
          </argument>
        </arguments>
      </action>
      <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>///Choose shown sprite and cap HP/PP

if global.dead[pl] {
    choose_health_bar_sprite(2)
} else {
    switch global.pl_count {
        case 1:
            dead = global.dead[1]
            break;
        case 2:
            dead = global.dead[1] or global.dead[2]
            break;
        case 3:
            dead = global.dead[1] or global.dead[2] or global.dead[3]
            break;
        case 4:
            dead = global.dead[1] or global.dead[2] or global.dead[3] or global.dead[4]
            break;
    }
    
    choose_health_bar_sprite(dead)
    
    if hp_actual &lt; 0    { hp_actual = 0 }
    if hp_actual &gt; 999  { hp_actual = 999 }
    
    if pp_actual &lt; 0    { pp_actual = 0 }
    if pp_actual &gt; 999  { pp_actual = 999 }
    
    if global.s_hp[pl] &lt; 0    { global.s_hp[pl] = 0 }
    if global.s_hp[pl] &gt; 999  { global.s_hp[pl] = 999 }
    
    if global.s_pp[pl] &lt; 0    { global.s_pp[pl] = 0 }
    if global.s_pp[pl] &gt; 999  { global.s_pp[pl] = 999 }
}
</string>
          </argument>
        </arguments>
      </action>
      <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>///Movement
if room = rmBattle {
    if objBattleController.in_battle {
        if global.allowboxjump {
            if keyboard_check_pressed(global.kb_choose) and path_position = 0 {
                path_start(pJump,3.5,0,0)
            }
        }
    } 
}
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="7" enumb="8">
      <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>path_position = 0
</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_set_alpha(1)
draw_set_color(image_blend)
draw_set_font(global.thenfont2)
draw_set_halign(fa_center)

//Draw the box
draw_self()
//Draw layer 1
draw_sprite(overlay,overlay_image_index,x,y)
//Draw layer 2
draw_sprite(overlay2,overlay2_image_index,x,y)

//Draw the player's name
draw_text(x+28,y+9,global.s_name[pl])

//Draw rolling meters. The health boxes support changing their sprites
//when a player dies, so you can hide the odometers if you so please
//if !global.dead[pl] {
    draw_odometer(hp_actual,x+24,y+24)
    if !global.s_cantconcentrate[pl] {
        draw_odometer(pp_actual,x+24,y+40)
    } else {
        draw_sprite(sprNoPSI,0,x+24,y+40)
    }
//}
</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>
    <point>0,0</point>
    <point>30,30</point>
  </PhysicsShapePoints>
</object>
