Files
AM2R-Community-Updates/objects/oEnemy.object.gmx
Lojemiru 989a8d8f0d Fixed #8
2021-02-06 04:40:43 -06:00

735 lines
21 KiB
XML

<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
<spriteName>sSaveStation</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="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>canbeX = 1;
timer = 0;
rotspeed = 0;
myspeed = 0;
offset = 0;
moveratio = 0;
movesteps = 0;
platform_engine_active = 0;
hpush = 5;
vpush = -3;
stun = 0;
stuntime = 4;
canflash = 1;
flashing = 0;
statetime = 0;
hitbeam = 1;
hitmissile = 1;
hitmissileexpl = 1;
hitpbomb = 1;
hitbomb = 1;
hitscrewattack = 1;
hitpseudoscrew = 1;
hitemp = 0;
canbehit = 1;
candamage = 1;
active = 0;
canfreeze = 1;
frozen = 0;
freezehp = 500;
freezetime = 300;
frozenspr = sHornoadFrozen;
empspr = sHornoadFrozen;
platform = -4;
platyoffset = -6;
justfrozen = 0;
freezefall = 1;
flipx = 1;
target = 0;
fxtimer = 0;
facing = 1;
if (y &gt; global.waterlevel &amp;&amp; global.waterlevel != 0) {
inwater = 1;
} else inwater = 0;
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="2" 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>justfrozen = 0;
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="2" 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>stunned = 0;
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="2" enumb="9">
<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 (frozen &gt; 0) {
alarm[9] = 30 + random(60);
spark = instance_create(x + floor(random(16) - 8), y + floor(random(16) - 8), oFXAnimSpark);
spark.gravity_direction = 270;
spark.gravity = 0.1;
spark.sprite_index = sIBeamFXA;
spark.image_speed = 0.3;
spark.image_index = 0;
spark.depth = -10;
}
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="3" 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>instance_activate_region(x - 32, y - 32, 64, 64, 1);
</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>if (frozen == 0 &amp;&amp; stun == 0) statetime += 1;
if (frozen &gt; 0) {
frozen -= 1;
image_speed = 0;
if (instance_exists(platform) == false) platform = instance_create(x - 8, y + platyoffset, oPlatform1);
}
if (frozen == 0) {
if (instance_exists(platform)) with (platform) instance_destroy();
}
if (y &gt; global.waterlevel &amp;&amp; global.waterlevel != 0) {
if (inwater == 0) {
instance_create(x, global.waterlevel, oSplash);
inwater = 1;
sfx_play(sndWaterExit);
}
} else if (inwater == 1) {
instance_create(x, global.waterlevel, oSplash);
inwater = 0;
sfx_play(sndWaterExit);
}
if (fxtimer &lt; 5) {
fxtimer += 1;
} else fxtimer = 0;
if (stun &gt; 0) stun -= 1;
if (flashing &gt; 0) flashing -= 1;
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="4" ename="oBomb2">
<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) event_user(0);
</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>if (canbehit) {
if (hitmissile) {
event_user(0);
with (other) event_user(0);
} else with (other) event_user(1);
if (myhealth &lt;= 0 &amp;&amp; frozen) {
enemy_death_frozen();
global.kills += 1;
}
}
</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 (canbehit) {
if (hitbeam &amp;&amp; other.dohit) {
event_user(0);
with (other) event_user(0);
}
if (!hitbeam) with (other) event_user(1);
if (other.pbeam == 0) with (other) instance_destroy();
}
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="4" ename="oMissileExpl">
<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 (canbehit) {
if (stun == 0 &amp;&amp; hitmissileexpl) event_user(0);
if (myhealth &lt;= 0 &amp;&amp; frozen == 0) state = 100;
if (myhealth &lt;= 0 &amp;&amp; frozen) {
enemy_death_frozen();
global.kills += 1;
}
}
</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>if (canbehit) {
if (stun == 0 &amp;&amp; hitpbomb) event_user(0);
if (myhealth &lt;= 0) state = 100;
}
</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>if (canbehit) {
if (stun == 0 &amp;&amp; hitbomb) event_user(0);
if (myhealth &lt;= 0 &amp;&amp; frozen == 0) state = 100;
if (myhealth &lt;= 0 &amp;&amp; frozen) {
enemy_death_frozen();
global.kills += 1;
}
}
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="4" ename="oSpeedBoost">
<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>state = 100;
enemy_death3();
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="4" ename="oScrewAttack">
<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 (hitscrewattack) {
state = 100;
enemy_death3();
}
</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>if (other.speedboost &gt; 0) {
state = 100;
enemy_death3();
}
dodamage = 1;
if (frozen &gt; 0 || other.state == 30 || other.state == 31 || other.state == 29 || other.speedboost &gt; 0 || other.state == 15 &amp;&amp; other.vjump == 0 &amp;&amp; global.screwattack == 1) dodamage = 0;
if (state == 100 || other.dash &gt;= 29) dodamage = 0;
if (other.inwater == 1 &amp;&amp; other.state == 15 &amp;&amp; other.vjump == 0 &amp;&amp; global.screwattack == 1 &amp;&amp; global.currentsuit != 2) dodamage = 1; //added
if (hitpseudoscrew == 1 &amp;&amp; other.chargebeam &gt;= 1 &amp;&amp; other.state == 15 &amp;&amp; other.vjump == 0 &amp;&amp; global.screwattack == 0 &amp;&amp; other.speedboost == 0) {
event_user(0);
if (myhealth &lt;= 0) state = 100;
other.chargebeam = 0;
other.nofire = 20;
dodamage = 0;
repeat (8) {
spark = instance_create(x, y, oFXTrail);
spark.additive = 1;
spark.fadespeed = 0.05;
spark.direction = point_direction(x, y - 8, oCharacter.x, oCharacter.y - 12) - 4 + random(8) + 90;
spark.speed = 1 + random(4);
if (random(2) &lt; 1) spark.direction += 180;
spark.sprite_index = sChargeBeamSpark2;
if (global.wbeam) spark.sprite_index = sChargeWBeamSpark2;
if (global.pbeam) spark.sprite_index = sChargePBeamSpark2;
if (global.ibeam) spark.sprite_index = sChargeIBeamSpark2;
}
}
if (dodamage == 1) damage_player(damage, hpush, vpush, 0, 0);
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="4" ename="oBatteryExpl">
<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 (hitemp) {
emp = instance_create(x, y, oEnemyDisabled);
emp.image_xscale = facing;
emp.sprite_index = empspr;
emp.image_index = image_index;
emp.mask_index = empspr;
if (platform_engine_active == 1) {
emp.xVel = xVel / 2;
emp.yVel = yVel / 2;
emp.collisionBoundsOffsetLeftX = collisionBoundsOffsetLeftX - 2;
emp.collisionBoundsOffsetTopY = collisionBoundsOffsetTopY - 2;
emp.collisionBoundsOffsetRightX = collisionBoundsOffsetRightX - 2;
emp.collisionBoundsOffsetBottomY = collisionBoundsOffsetBottomY - 2;
} else {
emp.xVel = hspeed / 2;
emp.yVel = vspeed / 2;
}
emp.depth = 10;
expl = instance_create(x, y, oFXAnimSpark);
expl.image_speed = 0.5;
expl.additive = 0;
expl.depth = -10;
expl.sprite_index = sGunzooShotExpl;
repeat (6) instance_create(x, y, oDebris);
repeat (10) {
spark = instance_create(x, y, oSparkParticle);
spark.mycolor = c_white;
spark.speed = random_range(3, 7);
}
sfx_play(sndEMPHit);
instance_destroy();
} // if (hitemp)
</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>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;
// 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;
if (object_index == oHalzyn) {
frz.xLastGlow = glow;
}
if (platform_engine_active == 1) {
frz.xVel = xVel;
frz.yVel = yVel;
frz.collisionBoundsOffsetLeftX = collisionBoundsOffsetLeftX - 2;
frz.collisionBoundsOffsetTopY = collisionBoundsOffsetTopY - 2;
frz.collisionBoundsOffsetRightX = collisionBoundsOffsetRightX - 2;
frz.collisionBoundsOffsetBottomY = collisionBoundsOffsetBottomY - 2;
} else {
frz.xVel = hspeed;
frz.yVel = vspeed;
}
frz.depth = 10;
frz.falling = freezefall;
PlaySoundMono(sndFreezeHit);
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>dmg = other.damage;
if (global.difficulty == 2) dmg = ceil(dmg / 2);
if (justfrozen == 0) myhealth -= dmg;
if (myhealth &lt;= 0 &amp;&amp; justfrozen == 0 &amp;&amp; state != 100) {
state = 100;
statetime = 0;
global.kills += 1;
}
stun = stuntime;
if (other.ibeam &amp;&amp; frozen == 0 &amp;&amp; canfreeze &amp;&amp; myhealth &lt; freezehp) event_user(15);
if (canflash) {
flashing = 5;
fxtimer = 0;
}
if (frozen) {
if (myhealth &gt; 0) PlaySoundMono(sndFreezeHit);
} else PlaySoundMono(hitsound);
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="7" enumb="4">
<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 (y &gt; global.waterlevel &amp;&amp; global.waterlevel != 0) {
inwater = 1;
} else inwater = 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>if (flipx) {
image_xscale = facing;
} else image_xscale = 1;
if (frozen) {
myspr = frozenspr;
} else myspr = sprite_index;
if (!flashing) {
draw_sprite_ext(myspr, -1, x, y, image_xscale, 1, image_angle, -1, image_alpha);
if (frozen &gt; 0 &amp;&amp; frozen &lt; freezetime * 0.2) {
draw_set_blend_mode(bm_add);
draw_sprite_ext(myspr, -1, x, y, image_xscale, 1, image_angle, -1, 1 - fxtimer * 0.25);
draw_set_blend_mode(bm_normal);
}
}
if (flashing) {
draw_sprite_ext(myspr, -1, x, y, image_xscale, 1, image_angle, make_color_rgb(80, 80, 80), 1);
draw_set_blend_mode(bm_add);
repeat (3) draw_sprite_ext(myspr, -1, x, y, image_xscale, 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>