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.
172 lines
5.1 KiB
172 lines
5.1 KiB
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
|
|
<object>
|
|
<spriteName>sBlobWaterIdle</spriteName>
|
|
<solid>0</solid>
|
|
<visible>-1</visible>
|
|
<depth>-3</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>action_inherited();
|
|
makeActive();
|
|
setCollisionBounds(-4, -8, 4, 0);
|
|
image_speed = 0.2;
|
|
image_index = choose(0,1);
|
|
myhealth = 14;
|
|
damage = 40;
|
|
hitsound = sndEHit1;
|
|
deathsound = sndEDeath2;
|
|
platyoffset = -1;
|
|
frozenspr = sBlobWaterFrozen;
|
|
target = 0;
|
|
canattack = 1;
|
|
state = 0;
|
|
facing = choose(-1,1);
|
|
yVelStart = random_range(-2,-1);
|
|
xVelStart = random_range(-1,1);
|
|
turnTimer = irandom_range(60,180);
|
|
driftSpeed = random_range(.3,.6);
|
|
driftMark = turnTimer/2;
|
|
</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>action_inherited();
|
|
enemy_active_check(20);
|
|
if (active == 1 && frozen == 0) {
|
|
if(state == 0)
|
|
{
|
|
if(y - 8 <= global.waterlevel) state = 1;
|
|
if(statetime < 11)
|
|
{
|
|
yVel = random_range(-1,-.5);
|
|
xVel = random_range(-1,1);
|
|
}
|
|
else if(statetime > 10 && statetime < 60)
|
|
{
|
|
yVel = yVelStart-0.02;
|
|
xVel = xVelStart;
|
|
}
|
|
else state = 1;
|
|
}
|
|
|
|
if (state == 1) {
|
|
turnTimer --;
|
|
if(turnTimer == 0) {
|
|
if (global.difficulty < 2) {
|
|
facing = -facing;
|
|
turnTimer = irandom_range(60,180);
|
|
driftMark = turnTimer/2;
|
|
} else { // Hard/Fusion mode targeting
|
|
if ((x >= oCharacter.x) && (facing == 1)) {
|
|
facing = -1;
|
|
turnTimer = irandom_range(60,180);
|
|
driftMark = turnTimer/2;
|
|
} else if ((x <= oCharacter.x) && (facing == -1)) {
|
|
facing = 1;
|
|
turnTimer = irandom_range(60,180);
|
|
driftMark = turnTimer/2;
|
|
} else {
|
|
turnTimer = irandom_range(60, 180);
|
|
}
|
|
}
|
|
}
|
|
xVel = driftSpeed * facing;
|
|
if(turnTimer > driftMark) yVel = 0.3;
|
|
else yVel = -0.1;
|
|
if(facing == facing)
|
|
{
|
|
if(turnTimer > driftMark*1.9 || turnTimer < driftMark*.1) sprite_index = sBlobWaterIdle;
|
|
else sprite_index = sBlobWaterRight;
|
|
}
|
|
if(facing == -facing)
|
|
{
|
|
if(turnTimer > driftMark*1.9 || turnTimer < driftMark*.1) sprite_index = sBlobWaterIdle;
|
|
else sprite_index = sBlobWaterLeft;
|
|
}
|
|
}
|
|
if (stun == 0) moveTo(xVel, yVel);
|
|
}
|
|
if (state == 100 || isCollisionBottom(2)) enemy_death();
|
|
</string>
|
|
</argument>
|
|
</arguments>
|
|
</action>
|
|
</event>
|
|
<event eventtype="4" ename="oScrewAttack">
|
|
<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 (hitscrewattack) {
|
|
state = 100;
|
|
enemy_death();
|
|
}
|
|
</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>0</PhysicsObjectKinematic>
|
|
<PhysicsShapePoints/>
|
|
</object>
|