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

341 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>sQueenFootFront</spriteName>
<solid>0</solid>
<visible>-1</visible>
<depth>-20</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>canhit = 1;
flashing = 0;
fxtimer = 0;
state = 0;
targetx = x;
joint0_x = x;
joint0_y = y;
joint1_x = x;
joint1_y = y;
joint1_angle = -10;
joint1_scale = 1;
joint1_len = 60;
joint2_x = x;
joint2_y = y;
joint3_x = x;
joint3_y = y;
joint3_scale = 1;
joint3_angle = 0;
image_angle = 0;
spr_foot = sQueenFootFront;
spr_leg1 = sQueenLegFront1;
spr_leg2 = sQueenLegFront2;
spr_leg3 = sQueenLegFront3;
spr_leg4 = sQueenLegFront4;
</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(oQueenHead)) {
flashing = oQueenHead.flashing;
fxtimer = oQueenHead.fxtimer;
}
</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>joint0_x = x - 13;
joint0_y = y - 20;
joint1_x = joint0_x + lengthdir_x(joint1_len, 130 + image_angle);
joint1_y = joint0_y + lengthdir_y(joint1_len, 130 + image_angle);
joint1_angle = point_direction(joint1_x, joint1_y, joint2_x, joint2_y);
joint1_scale = point_distance(joint1_x, joint1_y, joint2_x, joint2_y) / 60;
joint2_x = joint3_x + 21 + (x - (joint3_x + 13)) / 2;
joint2_y = y - (y - joint3_y) * 0.583;
joint3_angle = point_direction(joint3_x, joint3_y, joint2_x, joint2_y);
joint3_scale = point_distance(joint3_x, joint3_y, joint2_x, joint2_y) / 36.7;
image_angle = clamp(x - (joint3_x + 13), -30, 20);
if (state == 0) {
if (x - joint3_x &lt; -24) {
state = 1;
targetx = x + 80;
vspeed = -2.5;
gravity = 0.2;
gravity_direction = 270;
}
if (x - joint3_x &gt; 70) {
state = 1;
targetx = x - 80;
vspeed = -2.5;
gravity = 0.2;
gravity_direction = 270;
}
}
if (state == 1) {
if (abs(x - targetx) &gt; 1) {
x = lerp(x, targetx, abs(oQueen.maxspeed) / 10);
} else state = 0;
}
col1 = collision_line(x, y - 20, x, y, oSolid, true, true);
col2 = collision_point(x, y + 1, oSolid, true, true);
if (col2 &lt; 0) y += 1;
if (col1 &gt; 0) {
y -= 1;
if (vspeed &gt; 0) {
vspeed = 0;
gravity = 0;
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 (oQueen.state != 100) 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 (oQueen.state != 100) 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 (canhit == 1) damage_player_push(oQueen.damage, 1, 90, 0, 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>var i;
screen_shake(4, 2);
sfx_play(sndMZetaFootstep);
i = 0;
repeat (3) {
expl = instance_create(x - 20 + i * 20, y, oFXAnimSpark);
expl.image_speed = 0.5;
expl.additive = 0;
expl.sprite_index = sExplSmoke;
expl.depth = -25;
expl.vspeed = -0.5;
i += 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>
if(oControl.mod_fusion == 1 || oControl.MonsterPalettesFusionOnly == 0) {
pal_swap_set(oControl.QueenPalette, 2, false);
}
if (!flashing) {
draw_sprite(spr_leg4, -1, joint3_x, joint3_y);
draw_sprite_ext(spr_leg3, -1, joint3_x, joint3_y, joint3_scale, 1, joint3_angle, -1, 1);
draw_sprite_ext(spr_leg2, -1, joint1_x, joint1_y, joint1_scale, 1, joint1_angle, -1, 1);
draw_sprite_ext(spr_leg1, -1, joint0_x, joint0_y, 1, 1, image_angle, -1, 1);
draw_sprite(spr_foot, -1, x, y);
} else {
// Some code was shifted around here to prevent alpha blending bugs
draw_sprite_ext(spr_leg4, -1, joint3_x, joint3_y, 1, 1, 0, make_color_rgb(255 - fxtimer * 63, 255 - fxtimer * 63, 255 - fxtimer * 63), 1);
draw_set_blend_mode(bm_add);
repeat (2) {
draw_sprite_ext(spr_leg4, -1, joint3_x, joint3_y, 1, 1, 0, -1, 1 - fxtimer * 0.25);
}
draw_set_blend_mode(bm_normal);
draw_sprite_ext(spr_leg3, -1, joint3_x, joint3_y, joint3_scale, 1, joint3_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(spr_leg3, -1, joint3_x, joint3_y, joint3_scale, 1, joint3_angle, -1, 1 - fxtimer * 0.25);
}
draw_set_blend_mode(bm_normal);
draw_sprite_ext(spr_leg2, -1, joint1_x, joint1_y, joint1_scale, 1, joint1_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(spr_leg2, -1, joint1_x, joint1_y, joint1_scale, 1, joint1_angle, -1, 1 - fxtimer * 0.25);
}
draw_set_blend_mode(bm_normal);
draw_sprite_ext(spr_leg1, -1, joint0_x, joint0_y, 1, 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(spr_leg1, -1, joint0_x, joint0_y, 1, 1, image_angle, -1, 1 - fxtimer * 0.25);
}
draw_set_blend_mode(bm_normal);
draw_sprite_ext(spr_foot, -1, x, y, 1, 1, 0, make_color_rgb(255 - fxtimer * 63, 255 - fxtimer * 63, 255 - fxtimer * 63), 1);
draw_set_blend_mode(bm_add);
repeat (2) {
draw_sprite_ext(spr_foot, -1, x, y, 1, 1, 0, -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>