Files
AM2R-Community-Updates/objects/oMAlpha.object.gmx
2020-12-22 20:54:55 -06:00

1057 lines
29 KiB
XML

<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
<spriteName>sMAlpha</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 = 0;
makeActive();
setCollisionBounds(-15, -9, 15, 9);
hpush = 5;
vpush = -3;
flashing = 0;
flashtime = 0;
canbehit = 1;
frozen = 0;
platform = 0;
statetime = 0;
turndelay = 0;
currentangle = 0;
targetangle = 0;
rotspeed = 0;
targetx = 0;
targety = 0;
spdelay = 700;
turning = 0;
dodgedelay = 0;
dodgetime = 0;
dodging = 0;
fxtimer = 0;
chasing = 0;
hitsound = sndMAlphaHit;
deathsound = sndMAlphaDeath;
active = 1;
target = 0;
state = 3;
alarm[1] = 120;
alarm[3] = 1;
image_speed = 0.2;
damagedealt = 0;
if (global.log[11] == 0) {
global.log[11] = 1;
global.newlog[11] = 1;
}
scan_log(12, get_text("ScanEvents", "ScanBioform"), 180, 0);
last_one = 0;
myposx = floor(x / 320);
myposy = floor((y - 8) / 240);
mapposx = myposx + global.mapoffsetx;
mapposy = myposy + global.mapoffsety;
if (room != rm_a0h14) global.dmap[mapposx, mapposy] = 10;
else global.dmap[43, 24] = 10;
with (oControl) event_user(2);
</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>repeat (10) {
expl = instance_create(x - 16 + random(32), y - 16 + random(32), oFXAnimSpark);
expl.image_speed = 0.5 + random(0.5);
expl.additive = 0;
expl.sprite_index = sExpl1;
expl.direction = random(360);
expl.speed = 2 + random(1);
}
make_explosion4(x, y);
instance_create(x, y, oScreenFlash);
sfx_play(sndMAlphaExpl);
sfx_play(sndMissileExpl);
if (global.monstersalive == 0) mus_current_fadein();
if (oControl.mod_insanitymode == 0 || (global.difficulty &lt; 2 &amp;&amp; oControl.mod_insanitymode == 1)) {
if (damagedealt &gt; givebackhp) damagedealt = givebackhp;
monster_spawn_powerups(x, y, floor(damagedealt / 20), floor(starthealth / 10 / 2));
}
instance_destroy();
</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>expl = instance_create(x - 16 + random(32), y - 16 + random(32), oFXAnimSpark);
expl.image_speed = 0.5;
expl.additive = 0;
expl.sprite_index = sExpl1;
expl.image_xscale = 0.5;
expl.image_yscale = 0.5;
alarm[10] = 5;
</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>if (chasing == 0) {
chasing = 1;
alarm[3] = awaydelay;
} else event_user(1);
</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>flash = instance_create(x, y, oFXTrail);
flash.sprite_index = sprite_index;
flash.image_index = image_index;
flash.image_alpha = 1;
flash.white = 0;
flash.fadespeed = 0.15;
flash.depth = 10;
flash.image_xscale = facing;
flash.image_angle = image_angle;
if (state == 5 || dodging) alarm[2] = 3;
</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>if (state == 3) {
xVel *= 0.4;
yVel *= 1.2;
alarm[1] = 133;
}
</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 - 64, y - 64, 128, 128, 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 (active == 1) {
if (state == 1) {
xVel = 0;
yVel = 0;
}
if (state == 3) {
image_speed = 0.2;
if (spriteset == 2 &amp;&amp; !turning) sprite_index = sMAlpha3Move;
if (chasing) {
targetx = oCharacter.x;
targety = oCharacter.y - 24;
if (shell.hitting &amp;&amp; hitandrun) {
xVel = 0;
yVel = 0;
event_user(1);
with (shell) hitting = 0;
}
} else if (distance_to_object(oCharacter) &gt; 120) {
chasing = 1;
alarm[3] = awaydelay;
}
if (targety &gt; y) yVel += myaccely * 1.4;
if (targety - 24 &lt; y) yVel -= myaccely;
if (targetx &gt; x) xVel += myaccelx;
if (targetx &lt; x) xVel -= myaccelx;
if (isCollisionRight(1) &amp;&amp; xVel &gt; 0 || isCollisionLeft(1) &amp;&amp; xVel &lt; 0) xVel = 0;
if (isCollisionBottom(1) &amp;&amp; yVel &gt; 0 || isCollisionTop(1) &amp;&amp; yVel &lt; 0) yVel = 0;
rotspeed = 0.5;
if (abs(xVel) &gt; 1) {
targetangle = -abs(xVel) * 3;
} else targetangle = 0;
if (canspmove &amp;&amp; statetime &gt; 60 &amp;&amp; spdelay == 0 &amp;&amp; dodging == 0) {
state = 4;
statetime = 0;
turndelay = 1;
spdelay = 700;
}
if (candodge &amp;&amp; dodgedelay == 0 &amp;&amp; (instance_exists(oMissile) &amp;&amp; distance_to_object(oMissile) &lt; 64 || instance_exists(oBeam) &amp;&amp; distance_to_object(oBeam) &lt; 64) &amp;&amp; (facing == 1 &amp;&amp; oCharacter.x &gt; x || facing == -1 &amp;&amp; oCharacter.x &lt; x)) {
if (oCharacter.y - 48 &gt; y) {
yVel = 2.5;
if (oCharacter.x &gt; x) xVel = -3.5;
if (oCharacter.x &lt; x) xVel = 3.5;
}
if (oCharacter.y - 48 &lt; y) {
yVel = -4;
if (oCharacter.x &gt; x) xVel = 1;
if (oCharacter.x &lt; x) xVel = -1;
}
dodging = 1;
dodgetime = 0;
dodgedelay = 300;
alarm[2] = 1;
currentangle = -10;
canbehit = 0;
sfx_play(sndMAlphaDodge);
}
if (dodging &amp;&amp; dodgetime &gt;= 8) {
dodging = 0;
canbehit = 1;
}
} // if (state == 3)
if (state == 4) {
if (spriteset == 2) {
image_index = 0;
image_speed = 0;
sprite_index = sMAlpha3Attack;
}
if (oCharacter.y - 24 &gt; y) yVel += 0.1;
if (oCharacter.y - 24 &lt; y) yVel += -0.1;
if (oCharacter.y - 64 &gt; y) yVel *= 0.95;
if (distance_to_object(oCharacter) &lt; 128) {
if (oCharacter.x &gt; x) xVel += -0.1;
if (oCharacter.x &lt; x) xVel += 0.1;
}
xVel *= 0.98;
rotspeed = 1;
targetangle = -25;
if (statetime &gt; 50) {
state = 5;
statetime = 0;
turndelay = 70;
alarm[2] = 1;
sfx_play(sndMAlphaSP);
}
}
if (state == 5) {
image_speed = 0;
if (spriteset == 2 &amp;&amp; image_index &lt; 3) image_index += 0.05;
if (statetime &lt; 10) xVel *= 0.98;
if (statetime == 10) {
if (oCharacter.x &gt; x) xVel = 7;
if (oCharacter.x &lt; x) xVel = -7;
}
if (oCharacter.y - 16 &gt; y) yVel += 0.1;
if (oCharacter.y - 24 &lt; y) yVel += -0.1;
if (isCollisionBottom(1) &amp;&amp; yVel &gt; 0 || isCollisionTop(1) &amp;&amp; yVel &lt; 0) yVel = 0;
if (yVel &gt; 2) yVel = 2;
if (yVel &lt; -2) yVel = -2;
rotspeed = 1;
targetangle = -25;
if (statetime &gt; 60) {
state = 3;
statetime = 0;
turndelay = 30;
}
if (statetime &gt; 20 &amp;&amp; (isCollisionRight(1) || isCollisionLeft(1))) {
state = 6;
statetime = 0;
turndelay = 60;
}
} // if (state == 5)
if (state == 6) {
image_speed = 0;
if (spriteset == 2 &amp;&amp; image_index &gt; 0) image_index -= 0.1;
xVel = 0;
yVel = 0;
rotspeed = 0.25;
targetangle = 0;
if (statetime &gt; 30) {
state = 3;
statetime = 0;
turndelay = 30;
}
}
if (oCharacter.x &gt; x &amp;&amp; facing == -1) {
if (turndelay &gt; 0) turndelay -= 1;
if (turndelay == 0) {
facing = 1;
turndelay = 30;
turning = 1;
if (spriteset == 0) {
sprite_index = sMAlphaTurn;
myspr = 567;
}
if (spriteset == 1) {
sprite_index = sMAlpha2Turn;
myspr = 568;
}
if (spriteset == 2) {
sprite_index = sMAlpha3Turn;
myspr = 570;
}
image_index = 0;
}
}
if (oCharacter.x &lt; x &amp;&amp; facing == 1) {
if (turndelay &gt; 0) turndelay -= 1;
if (turndelay == 0) {
facing = -1;
turndelay = 30;
turning = 1;
if (spriteset == 0) {
sprite_index = sMAlphaTurn;
myspr = 567;
}
if (spriteset == 1) {
sprite_index = sMAlpha2Turn;
myspr = 568;
}
if (spriteset == 2) {
sprite_index = sMAlpha3Turn;
myspr = 570;
}
image_index = 0;
}
}
if (turning) {
image_speed = 0.5;
} else if (flashing || state == 100) image_speed = 0.4;
if (flashing) {
if (statetime == 0) {
dodgedelay = 20;
if (myhealth &gt; 0) state = 3;
}
if (statetime &lt; 8) {
if (oCharacter.x &gt; x) xVel = -0.5 - random(3);
if (oCharacter.x &lt; x) xVel = 0.5 + random(3);
yVel = -1 - random(4);
if (state == 100 &amp;&amp; fallondeath &amp;&amp; y &lt; 160) yVel = 2;
}
if (isCollisionRight(1) &amp;&amp; xVel &gt; 0 || isCollisionLeft(1) &amp;&amp; xVel &lt; 0) xVel *= -1;
xVel *= 0.95;
yVel *= 0.95;
rotspeed = 2;
targetangle = 0;
if (statetime &gt;= flashtime) {
canbehit = 1;
flashing = 0;
statetime = 0;
}
}
if (state != 5) {
if (yVel &gt; maxspeedy) yVel = maxspeedy;
if (yVel &lt; -maxspeedy) yVel = -maxspeedy;
if (xVel &gt; maxspeedx) xVel = maxspeedx;
if (xVel &lt; -maxspeedx) xVel = -maxspeedx;
}
if (currentangle &gt; targetangle) currentangle -= rotspeed;
if (currentangle &lt; targetangle) currentangle += rotspeed;
image_angle = currentangle * facing;
moveTo(xVel, yVel);
} // if (active == 1)
if (state == 100) {
if (statetime == 1) {
damagedealt += shell.damagedealt;
with (shell) instance_destroy();
}
xVel *= 0.98;
yVel *= 0.98;
}
if (instance_exists(shell)) {
shell.x = x;
shell.y = y;
shell.image_xscale = facing;
shell.image_angle = image_angle;
}
statetime += 1;
if (spdelay &gt; 0) spdelay -= 1;
if (dodgedelay &gt; 0) dodgedelay -= 1;
if (dodging) dodgetime += 1;
if (fxtimer &lt; 5) {
fxtimer += 1;
} else fxtimer = 0;
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="4" ename="oMStopDown">
<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 (yVel &gt; 0) yVel *= -0.2;
if (state == 5) {
state = 3;
statetime = 0;
turndelay = 30;
xVel = 0;
yVel = 0;
}
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="4" ename="oMStopUp">
<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 (yVel &lt; 0) yVel *= -0.2;
if (state == 5) {
state = 3;
statetime = 0;
turndelay = 30;
xVel = 0;
yVel = 0;
}
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="4" ename="oMStopLeft">
<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 (xVel &lt; 0) xVel *= -0.2;
if (state == 5) {
state = 3;
statetime = 0;
turndelay = 30;
xVel = 0;
yVel = 0;
}
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="4" ename="oMStopRight">
<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 (xVel &gt; 0) xVel *= -0.2;
if (state == 5) {
state = 3;
statetime = 0;
turndelay = 30;
xVel = 0;
yVel = 0;
}
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="4" ename="oMMoverAccelH">
<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>xVel *= 1.1;
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="4" ename="oMMoverDown">
<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 == 3) yVel += 1;
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="4" ename="oMMoverUp">
<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 == 3) yVel += -0.2;
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="4" ename="oMMoverRight">
<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 == 3) xVel += 0.2;
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="4" ename="oMMoverLeft">
<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 == 3) xVel += -0.2;
</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) {
event_user(0);
with (other) event_user(0);
}
</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 (oBeam.chargebeam &amp;&amp; !oBeam.ibeam &amp;&amp; !oBeam.wbeam &amp;&amp; !oBeam.pbeam &amp;&amp; !oBeam.sbeam &amp;&amp; global.missiles == 0 &amp;&amp; global.smissiles == 0) {
if (canbehit) {
event_user(0);
with (other) { event_user(0); instance_destroy(); }
}
}
else {
with (other) {
event_user(1);
instance_destroy();
}
}
</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 (myhealth &gt; 0) {
if (other.invincible == 0) damagedealt += damage;
if (false) damage_player(damage, hpush, vpush, 0, 0);//testing 2x damage
else damage_player(damage, hpush, vpush, 0, 0);
if (chasing &amp;&amp; hitandrun) {
xVel = 0;
yVel = 0;
event_user(1);
}
}
</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 (global.monstersalive == 1) {
last_one = 1;
maxspeedx = 3.6;
maxspeedy = 2.2;
myaccelx = 0.14;
myaccely = 0.1;
chasedelay = 120;
awaydelay = 80;
awayoffsetx = -10;
awayoffsety = -30;
}
</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>chasing = 0;
targetx = oCharacter.x + awayoffsetx * facing;
targety = oCharacter.y + awayoffsety;
alarm[3] = chasedelay;
</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 (other.smissile == 1) {
dmg = 50;
flashtime = 60;
} else {
dmg = 10;
flashtime = 30;
}
myhealth -= dmg;
if (myhealth &lt;= 0) {
state = 100;
statetime = 0;
alarm[10] = 1;
alarm[11] = 160;
flashtime = 180;
turndelay = 180;
PlaySoundMono(deathsound);
global.metdead[myid] = 1;
global.monstersleft -= 1;
global.monstersarea -= 1;
check_areaclear();
global.monstersalive -= 1;
if (global.monstersalive == 0) {
mus_fadeout(musAlphaFight);
oMusicV2.bossbgm = sndJump;
}
with (oMAlpha) event_user(2);
global.dmap[mapposx, mapposy] = 11;
with (oControl) event_user(2);
}
flashing = 1;
canbehit = 0;
statetime = 0;
currentangle = 30;
if (chasing == 0) {
chasing = 1;
alarm[3] = awaydelay;
}
if (myhealth &gt; 0) PlaySoundMono(hitsound);
if (sfx_isplaying(sndMAlphaIntro)) sfx_stop(sndMAlphaIntro);
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="7" enumb="7">
<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 (turning) {
turning = 0;
sprite_index = myspr;
}
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="7" enumb="5">
<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 (global.ingame == 1) {
global.monstersalive = 0;
mus_stop(musAlphaFight);
with (oMusicV2) {
alarm[1] = -1;
bossbgm = sndJump;
}
mus_current_fadein();
}
</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((oControl.mod_fusion == 1) || (oControl.MonsterPalettesFusionOnly == 0)) {
pal_swap_set(oControl.AlphaPalette, 1, false);
}
if (!flashing) draw_sprite_ext(sprite_index, -1, x, y, facing, 1, image_angle, -1, 1);
if (flashing) {
draw_sprite_ext(sprite_index, -1, x, y, facing, 1, image_angle, make_color_rgb(255 - fxtimer * 63, 255 - fxtimer * 63, 255 - fxtimer * 63), 1);
draw_set_blend_mode(bm_add);
repeat (2) draw_sprite_ext(sprite_index, -1, x, y, facing, 1, image_angle, -1, 1 - fxtimer * 0.25);
draw_set_blend_mode(bm_normal);
}
shader_reset();
</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>