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/oErisBody1.object.gmx

737 lines
21 KiB

<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
<spriteName>sErisBody1</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;
//hp = 10;
hp = global.mod_serrisHbody;
//damage = 50;
damage = global.mod_serrisDamage;
if (global.item[11] == 0)
{
state = 2;
}
else state = 0;
statetime = 0;
flashing = 0;
fxtimer = 0;
inrange = 0;
spr_normal = 778;
spr_frozen = 780;
spr_open = 779;
xoff = 0;
yoff = 0;
shaking = 0;
timer = 0;
rotspeed = 0;
myspeed = 0;
offset = 0;
moveratio = 0;
movesteps = 0;
event = 0;
//show_debug_message("YEET");
</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(oControl.mod_fusion == 1) {
spawn_rnd_pickup(100);
}
else {
monster_spawn_powerups(x, y, random(4), random(3));
}
//show_debug_message("NON-YEET");
</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>make_explosion3(x, y);
repeat (8 + floor(random(4))) {
bubble = instance_create(x, y, oLBubble);
if (instance_exists(bubble)) {
bubble.hspeed = random_range(-2.5, 2.5);
bubble.vspeed = -random(0.4);
}
}
sfx_play(sndMissileExpl);
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 (order == 15) visible = 0;
if (state != 100 &amp;&amp; oEris.stun == 0) {
//image_angle = point_direction(xprevious, yprevious, x, y);
if (order &lt; 14) {
image_angle = point_direction(x,y,oEris.mybody[order+1].x,oEris.mybody[order+1].y);
}
else image_angle = point_direction(x,y,oEris.x,oEris.y);
}
if (order != 15 &amp;&amp; oEris.boosting &amp;&amp; (oEris.fxtimer == 2 || oEris.fxtimer == 5)) {
var aft = instance_create(x,y,oFXTrail);
aft.sprite_index = sprite_index;
aft.image_index = image_index;
aft.depth = depth + 5;
aft.fadespeed = 0.08;
aft.image_angle = image_angle;
aft.image_xscale = image_xscale;
aft.image_yscale = image_yscale;
aft.additive = 1;
}
// bubbles during boost
if (oEris.boosting) repeat (floor(random(2))) {
bubble = instance_create(x+irandom_range(-5,5), y+irandom_range(-5,5), oLBubble);
if (instance_exists(bubble)) {
//bubble.hspeed = 2.5*sign(x-xprevious);
//bubble.vspeed = 2.5*sign(y-yprevious);
bubble.direction = point_direction(x, y, xprevious, yprevious)+irandom_range(-35,35); // (-image_angle*image_yscale)+irandom_range(-35,35);
bubble.alarm[0] = 10+irandom_range(0,20);
bubble.speed = 2;
bubble.eris = 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>inrange = (x &gt; 64) &amp;&amp; (x &lt; 576) &amp;&amp; (y &gt; 48) &amp;&amp; (y &lt; 448);
if (state == 0) sprite_index = spr_normal;
if (state == 1) {
sprite_index = spr_frozen;
if (statetime &gt;= 600) {
state = 0;
statetime = 0;
hp = 2;
}
}
if (state == 2) sprite_index = spr_open;
if (state == 100) {
if (statetime &lt; 30) {
speed *= 0.85;
} else if (vspeed &gt; -0.2) vspeed -= 0.01;
}
statetime += 1;
if (flashing &gt; 0) flashing -= 1;
fxtimer += 1;
if (fxtimer &gt; 5) fxtimer = 0;
if (shaking &gt; 0) {
xoff = random_range(-4, 4);
yoff = random_range(-4, 4);
shaking -= 1;
} else {
xoff = 0;
yoff = 0;
}
if (oEris.boostphase == 1 || oEris.boostphase == 3 || oEris.boostphase == 5) {
if (flashing &lt;= 1) {
flashing = 10;
}
}
/*if (order == 1) {
show_debug_message(string(x) + ", " + string(y));
}
</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 ((inrange) &amp;&amp; !oEris.boosting &amp;&amp; !flashing) with (other) event_user(0);
else with (other) event_user(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 (inrange &amp;&amp; !flashing &amp;&amp; !oEris.boosting) {
if (state == 0 || state == 1) {
if (other.ibeam) {
if (!other.pbeam) {
hp -= 4;
} else hp -= 2;
if (other.chargebeam) hp = 0;
with (other) event_user(0);
event_user(0);
} else with (other) event_user(1);
if (!other.pbeam) with (other) instance_destroy();
}
if (state == 2) {
with (other) {
event_user(0);
if (!pbeam) instance_destroy();
}
event_user(3);
}
}
else with (other) {
if (pbeam) event_user(1);
else {
event_user(0);
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 (inrange) {
if (state == 1) event_user(1);
if (state == 2 &amp;&amp; !flashing) {
if (other.smissile) {
event_user(4);
} else event_user(3);
}
}
</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 (inrange) {
if (state == 1) event_user(1);
if (state == 2 &amp;&amp; !flashing) event_user(2);
}
</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 (inrange) {
if (state == 1) event_user(1);
if (state == 2 &amp;&amp; !flashing) event_user(2);
}
</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 (state != 100) damage_player(damage, 7, -3, 0, 0);
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="7" enumb="20">
<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>direction = image_angle + random_range(-20, 20);
speed = 4;
alarm[1] = 200 + random(60);
state = 100;
statetime = 0;
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="7" enumb="15">
<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>/* no clue why this is borked but it's supposed to drag the segment to meet the one in front of it
var distNext = point_distance(x+lengthdir_x(sprite_width,direction), y+lengthdir_y(sprite_height,direction), oEris.mybody[order+1].x, oEris.mybody[order+1].y);
if (oEris.boosting &amp;&amp; (distNext &gt; 1) &amp;&amp; order &lt; 13) {
var dirNext = point_direction(x, y, oEris.mybody[order+1].x, oEris.mybody[order+1].y);
x += lengthdir_x(distNext, dirNext);
y += lengthdir_y(distNext, dirNext);
} /*else if (distNext &lt; 1) {
var dirNext = point_direction(x, y, oEris.mybody[order+1].x, oEris.mybody[order+1].y);
x += lengthdir_x(distNext, dirNext+180);
y += lengthdir_y(distNext, dirNext+180);
}
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="7" enumb="14">
<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 (state != 100) {
if (instance_exists(oEris)) with (oEris) {
hp -= 4;
stun = 3;
event_user(2);
}
repeat (4 + floor(random(4))) {
bubble = instance_create(x, y, oLBubble);
if (instance_exists(bubble)) {
bubble.hspeed = random_range(-1, 1);
bubble.vspeed = -random(0.4);
}
}
shaking = 8;
}
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="7" enumb="13">
<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 (state != 100) {
if (instance_exists(oEris)) with (oEris) {
hp -= 2;
stun = 2;
event_user(2); // was commented out??? HAHA NO I'M A GENIUS
//use2 = 1;
}
repeat (4 + floor(random(4))) {
bubble = instance_create(x, y, oLBubble);
if (instance_exists(bubble)) {
bubble.hspeed = random_range(-1, 1);
bubble.vspeed = -random(0.4);
}
}
shaking = 8;
}
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="7" enumb="12">
<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 (state != 100) {
if (instance_exists(oEris)) with (oEris) {
hp -= 1;
stun = 1;
//use2 = 1; //event_user(2);
}
repeat (4 + floor(random(4))) {
bubble = instance_create(x, y, oLBubble);
if (instance_exists(bubble)) {
bubble.hspeed = random_range(-1, 1);
bubble.vspeed = -random(0.4);
}
}
shaking = 8;
}
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="7" 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>if (state != 100) {
flashing = 10;
shaking = 8;
state = 2;
statetime = 0;
if (instance_exists(oEris)) with (oEris) stun = 2;
PlaySoundMono(sndIceShatter);
repeat (8) deb = instance_create(x, y - 8, oIceShard);
repeat (8 + floor(random(4))) {
bubble = instance_create(x, y, oLBubble);
if (instance_exists(bubble)) {
bubble.hspeed = random_range(-2.5, 2.5);
bubble.vspeed = -random(0.4);
}
}
if (global.waterlevel != 0 &amp;&amp; y + 8 &gt; global.waterlevel + global.wateroffset) {
repeat (8 + floor(random(4))) {
bubble = instance_create(x, y, oLBubble);
if (instance_exists(bubble)) {
bubble.hspeed = random_range(-1.5, 1.5);
bubble.vspeed = -random(0.4);
}
}
}
} // if (state != 100)
</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>if (state != 100) {
flashing = 10;
if (hp &lt;= 0) {
hp = 0;
state = 1;
statetime = 0;
sfx_stop(sndFreezeHit);
sfx_play(sndFreezeHit);
} else sfx_play(sndIceBeamHit);
}
</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_set_blend_mode(bm_add);
repeat (2) {
if (flashing &gt; 0) draw_sprite_ext(sprite_index, -1, x + xoff, y + yoff, image_xscale, image_yscale, image_angle, -1, flashing * 0.1);
}
if (state == 1 &amp;&amp; statetime &gt; 240) {
repeat (2) draw_sprite_ext(sprite_index, -1, x + xoff, y + yoff, image_xscale, image_yscale, image_angle, -1, fxtimer * 0.1);
}
draw_set_blend_mode(bm_normal);
// speedboosting
if (oEris.boosting) {
if (oEris.fxtimer == 0 || oEris.fxtimer == 1) {
draw_set_blend_mode(bm_add);
draw_sprite_ext(sprite_index, -1, x + xoff, y + yoff, image_xscale, image_yscale, image_angle, c_green, 1.1 + oEris.fxtimer * 0.2);
draw_set_blend_mode(bm_normal);
}
if (oEris.fxtimer == 2 || oEris.fxtimer == 3) {
draw_set_blend_mode(bm_add);
repeat (2) {
draw_sprite_ext(sprite_index, -1, x + xoff, y + yoff, image_xscale, image_yscale, image_angle, c_yellow, 1);
draw_sprite_ext(sprite_index, -1, x + xoff, y + yoff, image_xscale, image_yscale, image_angle, c_white, 1);
}
draw_set_blend_mode(bm_normal);
}
if (oEris.fxtimer == 4 || oEris.fxtimer == 5) {
draw_set_blend_mode(bm_add);
repeat (2) {
draw_sprite_ext(sprite_index, -1, x + xoff, y + yoff, image_xscale, image_yscale, image_angle, c_red, 1);
}
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>