You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AM2R-TimeTrials/objects/oGunzoo.object.gmx

365 lines
11 KiB

<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
<spriteName>sGunzoo</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>event_inherited();
canbeX = 0;
makeActive();
setCollisionBounds(-14, -14, 14, 14);
facing = 1;
myhealth = 240;
freezehp = 120;
prevhealth = myhealth;
damage = 32;
hpush = 6;
vpush = -3;
hitmissileexpl = 0;
hitsound = sndRobotHit4;
deathsound = sndRobotExpl;
canfreeze = 1;
platyoffset = -6;
frozenspr = sGunzooFrozen;
flipx = 0;
target = 0;
canattack = 1;
state = 1;
targetx = x;
targety = y;
haccel = 0.2;
vaccel = 0.9;
aoffset = 0;
phase = 0;
turning = 0;
prefiretime = 40;
if (global.difficulty == 0) prefiretime = 70;
if (global.difficulty &gt;= 2) prefiretime = 20;
hitemp = 1;
empspr = sGunzooDisabled;
</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>expl = instance_create(x - 8 + random(16), y - 8 + random(16), oFXAnimSpark);
expl.image_speed = 0.5;
expl.additive = 0;
expl.sprite_index = sExpl1;
expl.depth = -4;
expl.image_xscale = 0.5;
expl.image_yscale = 0.5;
alarm[3] = 3;
</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>proj = instance_create(x + 8 * facing, y - 7, oGunzooProj1);
proj.hspeed = 8 * facing;
proj.image_xscale = facing;
sfx_play(sndAutrackFire);
if (state == 2) alarm[0] = 7;
</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>event_inherited();
enemy_active_check(20);
enemy_target_check(90, 1);
switch (phase) {
case 0: vaccel = 0.3; break;
case 1: vaccel = 0.5; break;
case 2: vaccel = 0.7; break;
}
if (state == 1) {
if (facing == 1) {
targetx = oCharacter.x - 120;
} else targetx = oCharacter.x + 120;
targety = oCharacter.y - (sprite_get_height(oCharacter.mask_index)/2); // 1.5.1 fix
if (aoffset &gt; 0) aoffset -= 0.2;
if (x &gt; targetx) xVel -= haccel;
if (x &lt; targetx) xVel += haccel;
if (y &gt; targety) yVel -= vaccel;
if (y &lt; targety) yVel += vaccel;
if (xVel &gt; 2) xVel = 2;
if (xVel &lt; -2) xVel = -2;
if (yVel &gt; 4) yVel = 4;
if (yVel &lt; -4) yVel = -4;
if (oCharacter.x &gt; x &amp;&amp; facing == -1 &amp;&amp; turning == 0) turning = 4;
if (oCharacter.x &lt;= x &amp;&amp; facing == 1 &amp;&amp; turning == 0) turning = 4;
if (statetime &gt; 120) {
if (collision_line(x, y - 6, x + 160 * facing, y - 6, oCharacter, false, true)) {
state = 2;
statetime = 0;
}
}
}
if (state == 2) {
xVel *= 0.8;
yVel *= 0.8;
if (aoffset &lt; 2) aoffset += 0.2;
if (statetime == 0) { }
if (statetime == 60) alarm[0] = 1;
if (statetime == 90) {
state = 1;
statetime = -1;
}
}
if (stun == 0) moveTo(xVel, yVel);
if (state == 100) {
canbehit = 0;
alarm[1] = 0;
yVel += 0.1;
moveTo(xVel, yVel);
if (xVel &lt;= 0) image_angle += 0.6;
if (xVel &gt; 0) image_angle -= 0.6;
if (isCollisionLeft(1) || isCollisionRight(1)) xVel = 0;
if (isCollisionBottom(1) || statetime &gt; 240 || y &gt; view_yview[0] + 240) {
enemy_death2();
repeat (20) instance_create(x, y, oDebris);
}
}
if (turning == 2) facing *= -1;
if (turning &gt; 0) turning -= 1;
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="7" enumb="25">
<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();
deb = instance_create(x, y, oDebris);
deb.sprite_index = sGunzooArmor1;
deb.depth = -4;
</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>event_inherited();
if (random(2) &lt; 0.2) instance_create(x, y, oDebris);
if (myhealth &lt;= 140 &amp;&amp; prevhealth &gt; 140) {
expl = instance_create(x, y - 8, oFXAnimSpark);
expl.image_speed = 0.5;
expl.additive = 0;
expl.sprite_index = sExpl1;
expl.depth = -4;
repeat (8) instance_create(x, y, oDebris);
deb = instance_create(x, y, oDebris);
deb.sprite_index = sGunzooArmor1;
deb.depth = -4;
phase = 1;
}
if (myhealth &lt;= 70 &amp;&amp; prevhealth &gt; 70) {
expl = instance_create(x + 8, y, oFXAnimSpark);
expl.image_speed = 0.5;
expl.additive = 0;
expl.sprite_index = sExpl1;
expl.depth = -4;
repeat (8) instance_create(x, y, oDebris);
deb = instance_create(x, y, oDebris);
deb.sprite_index = sGunzooArmor1;
deb.depth = -4;
phase = 2;
}
if (myhealth &lt;= 0) alarm[3] = 1;
prevhealth = myhealth;
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="7" 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>instance_destroy();
</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>if (!flashing) {
if (turning == 0) {
draw_sprite_ext(sprite_index, -1, x, y, facing, 1, image_angle, -1, 1);
if (phase == 0) draw_sprite_ext(sGunzooArmor1, -1, x, y - aoffset, facing, 1, image_angle, -1, 1);
if (phase &lt;= 1) draw_sprite_ext(sGunzooArmor2, -1, x + aoffset, y, facing, 1, image_angle, -1, 1);
}
if (turning &gt; 0) draw_sprite_ext(sGunzooTurn, -1, x, y, facing, 1, image_angle, -1, 1);
}
if (flashing) {
if (turning == 0) {
draw_sprite_ext(sprite_index, -1, x, y, facing, 1, image_angle, make_color_rgb(80, 80, 80), 1);
if (phase == 0) draw_sprite_ext(sGunzooArmor1, -1, x, y - aoffset, facing, 1, image_angle, make_color_rgb(80, 80, 80), 1);
if (phase &lt;= 1) draw_sprite_ext(sGunzooArmor2, -1, x + aoffset, y, facing, 1, image_angle, make_color_rgb(80, 80, 80), 1);
}
if (turning &gt; 0) draw_sprite_ext(sGunzooTurn, -1, x, y, facing, 1, image_angle, make_color_rgb(80, 80, 80), 1);
draw_set_blend_mode(bm_add);
repeat (3) {
if (turning == 0) {
draw_sprite_ext(sprite_index, -1, x, y, facing, 1, image_angle, -1, 1 - fxtimer * 0.25);
if (phase == 0) draw_sprite_ext(sGunzooArmor1, -1, x, y - aoffset, facing, 1, image_angle, -1, 1 - fxtimer * 0.25);
if (phase &lt;= 1) draw_sprite_ext(sGunzooArmor2, -1, x + aoffset, y, facing, 1, image_angle, -1, 1 - fxtimer * 0.25);
}
if (turning &gt; 0) draw_sprite_ext(sGunzooTurn, -1, x, y, facing, 1, image_angle, -1, 1 - fxtimer * 0.25);
}
draw_set_blend_mode(bm_normal);
}
</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>