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.
492 lines
15 KiB
492 lines
15 KiB
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
|
|
<object>
|
|
<spriteName>sA2SmallTurbine</spriteName>
|
|
<solid>0</solid>
|
|
<visible>-1</visible>
|
|
<depth>-101</depth>
|
|
<persistent>0</persistent>
|
|
<parentName><undefined></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>myhealth = 50;
|
|
stun = 0;
|
|
flashing = 0;
|
|
fxtimer = 0;
|
|
wall = instance_create(x, y + 16, oSolid2x1);
|
|
alarm[0] = 1;
|
|
canbehit = 1;
|
|
hitsound = sndRobotHit1;
|
|
deathsound = sndRobotExpl;
|
|
</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>with (wall) instance_destroy();
|
|
</string>
|
|
</argument>
|
|
</arguments>
|
|
</action>
|
|
</event>
|
|
<event eventtype="2" 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 (lbubbles) {
|
|
b = instance_create(x - 96, y - 4 - random(24), oCurrentBubble);
|
|
b.hspeed = 3 + random(1);
|
|
b.xlimit = x;
|
|
}
|
|
if (rbubbles) {
|
|
b = instance_create(x + 112, y - 4 - random(24), oCurrentBubble);
|
|
b.hspeed = -3 - random(1);
|
|
b.xlimit = x + 32;
|
|
}
|
|
alarm[0] = 5 + random(3);
|
|
</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 (stun > 0) stun -= 1;
|
|
if (flashing > 0) flashing -= 1;
|
|
if (fxtimer < 5) {
|
|
fxtimer += 1;
|
|
} else fxtimer = 0;
|
|
if (global.event[101] + 1 == eventno) {
|
|
canbehit = 1;
|
|
} else canbehit = 0;
|
|
if (global.currentsuit != 2) { // Draw player in
|
|
if (oCharacter.y > y - 48 && oCharacter.y < y + 16) {
|
|
if (oCharacter.x < x + 12) {
|
|
if (oCharacter.x > x - 96) with (oCharacter) if (isCollisionRight(2) == 0) x += 0.2;
|
|
if (oCharacter.x > x - 80) with (oCharacter) if (isCollisionRight(2) == 0 && state != 15) x += 0.1;
|
|
if (oCharacter.x > x - 64) with (oCharacter) if (isCollisionRight(2) == 0 && state != 15) x += 0.1;
|
|
if (oCharacter.x > x - 48) with (oCharacter) if (isCollisionRight(2) == 0 && state != 15) x += 0.1;
|
|
if (oCharacter.x > x - 32) with (oCharacter) if (isCollisionRight(2) == 0 && state != 15) x += 0.1;
|
|
if (oCharacter.x > x - 16) with (oCharacter) if (isCollisionRight(2) == 0 && state != 15) x += 0.1;
|
|
}
|
|
if (oCharacter.x > x + 18) {
|
|
if (oCharacter.x < x + 96 + 16) with (oCharacter) if (isCollisionLeft(2) == 0) x -= 0.2;
|
|
if (oCharacter.x < x + 80 + 16) with (oCharacter) if (isCollisionLeft(2) == 0 && state != 15) x -= 0.1;
|
|
if (oCharacter.x < x + 64 + 16) with (oCharacter) if (isCollisionLeft(2) == 0 && state != 15) x -= 0.1;
|
|
if (oCharacter.x < x + 48 + 16) with (oCharacter) if (isCollisionLeft(2) == 0 && state != 15) x -= 0.1;
|
|
if (oCharacter.x < x + 32 + 16) with (oCharacter) if (isCollisionLeft(2) == 0 && state != 15) x -= 0.1;
|
|
if (oCharacter.x < x + 16 + 16) with (oCharacter) if (isCollisionLeft(2) == 0 && state != 15) x -= 0.1;
|
|
}
|
|
}
|
|
}
|
|
|
|
//var bomb = instance_nearest(x, y, oBomb);
|
|
if (instance_exists(oBomb) && (distance_to_object(oBomb) <= 80) && (oBomb.y >= global.waterlevel)) with (oBomb) {
|
|
var dist = distance_to_point(oA2SmallTurbine.x + 16, oA2SmallTurbine.y - 2);
|
|
var dist2 = distance_to_point(oA2SmallTurbine.x + 16, oA2SmallTurbine.y + 16);
|
|
if ((dist <= 80) && (dist > 12)) {
|
|
var spd = clamp(180/dist, 0.1, 2.5);
|
|
x += lengthdir_x(spd,point_direction(x,y,oA2SmallTurbine.x + 16, oA2SmallTurbine.y - 2));
|
|
y += lengthdir_y(spd,point_direction(x,y,oA2SmallTurbine.x + 16, oA2SmallTurbine.y - 2));
|
|
} else if (dist <= 12) {
|
|
var spd = clamp(180/dist2, 0.1, 2.5);
|
|
x += lengthdir_x(spd,point_direction(x,y,oA2SmallTurbine.x + 16, oA2SmallTurbine.y + 16));
|
|
y += lengthdir_y(spd,point_direction(x,y,oA2SmallTurbine.x + 16, oA2SmallTurbine.y + 16));
|
|
}
|
|
if (dist2 <= 0) {
|
|
event_user(0);
|
|
}
|
|
}
|
|
|
|
/*with (oBomb) {
|
|
var turbine = instance_nearest(x, y, oA2SmallTurbine);
|
|
if (instance_exists(turbine)) {
|
|
if (distance_to_point(turbine.x + 16, turbine.y) > 16) {
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
if (instance_exists(oBomb)) { // Draw bombs in
|
|
var bomb = instance_nearest(x, y, oBomb);
|
|
if (distance_to_object(bomb) < 80) {
|
|
with (bomb) {
|
|
var turb = instance_nearest(x, y, oA2SmallTurbine);
|
|
var xdist = abs(distance_to_point(turb.x + 16, y));
|
|
var ydist = distance_to_point(x, turb.y);
|
|
if (ydist < 48) {
|
|
if (xdist < 96) {
|
|
if ((turb.x + 16) < x) {
|
|
x -= 0.3;
|
|
x -= 0.6*(xdist/96);
|
|
} else if ((turb.x + 16) > x) {
|
|
x += 0.3;
|
|
x += 0.6*(xdist/96);
|
|
}
|
|
}
|
|
if (((turb.y + 16) > y) && (xdist < 12)) {
|
|
y += 0.6;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</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 (stun == 0) 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 (canbehit) {
|
|
if (stun == 0) event_user(0);
|
|
with (other) {
|
|
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 (stun == 0) event_user(0);
|
|
</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 && stun == 0) event_user(0);
|
|
</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 && stun == 0) event_user(0);
|
|
</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>damage_player(4, 5, -6, 0, 0);
|
|
</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>expl = instance_create(x + 16, y + 16, oFXAnimSpark);
|
|
expl.image_speed = 0.5;
|
|
expl.additive = 0;
|
|
expl.sprite_index = sExpl1;
|
|
repeat (8) {
|
|
expl = instance_create(x + random(32), y + random(32), oFXAnimSpark);
|
|
expl.image_speed = 0.4 + random(0.4);
|
|
expl.additive = 0;
|
|
expl.sprite_index = sExpl1;
|
|
}
|
|
repeat (20) instance_create(x + 16, y + 3, oDebris);
|
|
PlaySoundMono(deathsound);
|
|
with (oMoveWater) instance_destroy();
|
|
o = instance_create(x, y, oMoveWater);
|
|
o.delay = 2;
|
|
if (eventno == 2) {
|
|
o.targety = 208;
|
|
global.event[101] = 2;
|
|
}
|
|
if (eventno == 3) {
|
|
o.targety = 304;
|
|
global.event[101] = 3;
|
|
}
|
|
if (eventno == 4) {
|
|
o.targety = 432;
|
|
global.event[101] = 4;
|
|
}
|
|
instance_activate_region(x - 64, y - 64, 128, 128, 1);
|
|
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>myhealth -= other.damage;
|
|
if (myhealth <= 0) event_user(1);
|
|
stun = 4;
|
|
flashing = 5;
|
|
fxtimer = 0;
|
|
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 (global.event[101] >= eventno) instance_destroy();
|
|
</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 (!flashing) draw_sprite_ext(sprite_index, -1, x, y, image_xscale, 1, image_angle, -1, image_alpha);
|
|
if (flashing) {
|
|
draw_sprite_ext(sprite_index, -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(sprite_index, -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>
|