You've already forked AM2R-Community-Updates
mirror of
https://github.com/izzy2lost/AM2R-Community-Updates.git
synced 2026-03-10 11:23:35 -07:00
318 lines
10 KiB
XML
318 lines
10 KiB
XML
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
|
|
<object>
|
|
<spriteName>sHalzynBody</spriteName>
|
|
<solid>0</solid>
|
|
<visible>-1</visible>
|
|
<depth>0</depth>
|
|
<persistent>0</persistent>
|
|
<parentName>oEnemy</parentName>
|
|
<maskName><undefined></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();
|
|
makeActive();
|
|
setCollisionBounds(-14, -14, 14, 14);
|
|
facing = 1;
|
|
myhealth = 60;
|
|
freezehp = 10;
|
|
damage = 32;
|
|
hpush = 6;
|
|
vpush = -3;
|
|
hitsound = sndEHit2;
|
|
deathsound = sndEDeath1;
|
|
platyoffset = -6;
|
|
frozenspr = sHalzynBodyFrozen;
|
|
flipx = 0;
|
|
state = 0;
|
|
shield1 = instance_create(x + 8, y - 3, oHalzynShield);
|
|
shield2 = instance_create(x - 8, y - 3, oHalzynShield);
|
|
shield2.image_xscale = -1;
|
|
shield_angle = 0;
|
|
shield_offset = 0;
|
|
time = 0;
|
|
limit_l = x - 80;
|
|
limit_r = x + 80;
|
|
glow = 0;
|
|
eyeSprite = sHalzynEye;
|
|
</string>
|
|
</argument>
|
|
</arguments>
|
|
</action>
|
|
</event>
|
|
<event eventtype="1" 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 (instance_exists(shield1) && instance_exists(shield2)) {
|
|
with (shield1) instance_destroy();
|
|
with (shield2) instance_destroy();
|
|
}
|
|
</string>
|
|
</argument>
|
|
</arguments>
|
|
</action>
|
|
</event>
|
|
<event eventtype="3" 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>if (instance_exists(shield1) && instance_exists(shield2)) {
|
|
shield1.image_angle = shield_angle;
|
|
shield2.image_angle = -shield_angle;
|
|
shield1.x = round(x) + 8 + shield_offset;
|
|
shield1.y = round(y) - 3;
|
|
shield2.x = round(x) - 8 - shield_offset;
|
|
shield2.y = round(y) - 3;
|
|
if (frozen == 0) { /// (real(string_char_at(room_get_name(room), 5)) == 4 || glow == 1) &&
|
|
if(instance_exists(oLavaSurface)) {
|
|
if (glow == 1) {
|
|
sprite_index = sHalzynBodyA4;
|
|
shield1.sprite_index = sHalzynShieldA4;
|
|
shield2.sprite_index = sHalzynShieldA4;
|
|
eyeSprite = sHalzynEye_lava;
|
|
} else if (glow == 2) {
|
|
sprite_index = sHalzynBodyA4;
|
|
shield1.sprite_index = sHalzynShieldA4_2;
|
|
shield2.sprite_index = sHalzynShieldA4_2;
|
|
eyeSprite = sHalzynEye_lava;
|
|
}
|
|
}
|
|
else {
|
|
shield1.sprite_index = sHalzynShield;
|
|
shield2.sprite_index = sHalzynShield;
|
|
}
|
|
shield1.canhit = 1;
|
|
shield2.canhit = 1;
|
|
} else {
|
|
shield1.sprite_index = sHalzynShieldFrozen;
|
|
shield2.sprite_index = sHalzynShieldFrozen;
|
|
shield1.canhit = 0;
|
|
shield2.canhit = 0;
|
|
}
|
|
}
|
|
</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) {
|
|
if (state == 0) {
|
|
shield_angle = 5 + sin(time) * 10;
|
|
shield_offset = sin(time + 2) * -1.5;
|
|
time += 0.15;
|
|
hspeed = lerp(hspeed, 0.5 * facing, 0.05);
|
|
vspeed = 0;
|
|
if (collision_line(x + facing * 25, y - 4, x + facing * 25, y + 4, oSolid, true, true) || facing == 1 && x > limit_r || facing == -1 && x < limit_l) facing = -facing;
|
|
if (collision_line(x + facing * 30, y - 4, x + facing * 30, y + 4, oHalzynShield, true, true)) facing = -facing;
|
|
if (collision_line(x, y, x, y + 120, oCharacter, true, true)) {
|
|
state = 1;
|
|
statetime = 0;
|
|
startx = x;
|
|
starty = y;
|
|
speed = 0;
|
|
}
|
|
}
|
|
if (state == 1) {
|
|
if (statetime < 30) {
|
|
shield_angle = lerp(shield_angle, -20, 0.2);
|
|
shield_offset = lerp(shield_offset, 0, 0.1);
|
|
}
|
|
if (statetime >= 30 && statetime < 160) {
|
|
direction = point_direction(x, y, oCharacter.x, oCharacter.y - 16);
|
|
speed = lerp(speed, 2.7, 0.04);
|
|
if ((oCharacter.state == oCharacter.BALL && point_distance(x, y, oCharacter.x, oCharacter.y - 16) < 3) || (oCharacter.state != oCharacter.BALL && point_distance(x, y, oCharacter.x, oCharacter.y - 16) < 8)) {
|
|
state = 2;
|
|
statetime = -1;
|
|
speed = 0;
|
|
}
|
|
if (statetime > 60 && collision_line(x - 16, y + 10, x + 16, y + 10, oSolid, true, true) || collision_line(x + 20, y - 8, x + 20, y + 8, oSolid, true, true) || collision_line(x - 20, y - 8, x - 20, y + 8, oSolid, true, true)) {
|
|
state = 2;
|
|
statetime = -1;
|
|
speed = 0;
|
|
}
|
|
shield_angle = lerp(shield_angle, 30, 0.2);
|
|
}
|
|
if (statetime >= 160) speed *= 0.95;
|
|
if (statetime >= 180) {
|
|
state = 2;
|
|
statetime = -1;
|
|
}
|
|
} // if (state == 1)
|
|
if (state == 2) {
|
|
direction = point_direction(x, y, startx, starty);
|
|
speed = lerp(speed, 2, 0.1);
|
|
shield_angle = lerp(shield_angle, 5, 0.1);
|
|
if (point_distance(x, y, startx, starty) < 2) {
|
|
state = 0;
|
|
statetime = -1;
|
|
time = 0;
|
|
vspeed = 0;
|
|
x = startx;
|
|
y = starty;
|
|
}
|
|
}
|
|
} else speed = 0; // if (frozen == 0) else
|
|
event_inherited();
|
|
if (state == 100) {
|
|
if (instance_exists(shield1) && instance_exists(shield2)) {
|
|
deb = instance_create(shield1.x, shield1.y, oDebris);
|
|
deb.image_angle = shield1.image_angle;
|
|
deb.sprite_index = sHalzynShield;
|
|
deb.direction = 0 + random(30);
|
|
deb.speed = 0.5 + random(3);
|
|
deb.gravity = 0.1;
|
|
deb.playsound = 0;
|
|
deb = instance_create(shield2.x, shield2.y, oDebris);
|
|
deb.image_angle = shield2.image_angle;
|
|
deb.sprite_index = sHalzynShield;
|
|
deb.image_xscale = -1;
|
|
deb.direction = 180 - random(30);
|
|
deb.speed = 0.5 + random(3);
|
|
deb.gravity = 0.1;
|
|
deb.playsound = 0;
|
|
with (shield1) instance_destroy();
|
|
with (shield2) instance_destroy();
|
|
}
|
|
enemy_death();
|
|
}
|
|
</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();
|
|
frz.spr1 = sHalzynShieldFrozen;
|
|
frz.spr1xoff = 8 + shield_offset;
|
|
frz.spr1yoff = -3;
|
|
frz.spr1a = shield_angle;
|
|
frz.spr2 = sHalzynShieldFrozen;
|
|
frz.spr2xoff = -8 - shield_offset;
|
|
frz.spr2yoff = -3;
|
|
frz.spr2a = -shield_angle;
|
|
frz.spr2xs = -1;
|
|
</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_self();
|
|
draw_sprite(sprite_index, image_index, round(x), round(y));
|
|
event_inherited();
|
|
with(shield1) draw_self();
|
|
with(shield2) draw_self();
|
|
if(instance_exists(oCharacter) && collision_line(x, y, oCharacter.x-1, oCharacter.y-16, oSolid, false, true) == noone) {
|
|
draw_sprite(eyeSprite, floor((point_direction(x, y, oCharacter.x-1, oCharacter.y-16)+22.5)/45), round(x), round(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>-1</PhysicsObjectKinematic>
|
|
<PhysicsShapePoints/>
|
|
</object>
|