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

186 lines
5.3 KiB

<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
<spriteName>sBlobAir</spriteName>
<solid>0</solid>
<visible>-1</visible>
<depth>-3</depth>
<persistent>0</persistent>
<parentName>oEnemy</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>action_inherited();
makeActive();
setCollisionBounds(-4, -8, 4, 0);
image_speed = 0.3;
image_index = choose(0,1);
myhealth = 5;
damage = 10;
hitsound = sndEHit1;
deathsound = sndEDeath2;
platyoffset = -1;
frozenspr = sBlobAirFrozen;
target = 0;
canattack = 1;
state = 0;
yVelStart = random_range(-1.5,-1);
xVelStart = random_range(-1,1);
targetx = oCharacter.x;
targety = oCharacter.y - oCharacter.sprite_height/2;
hovertime = choose(0,0.2,0.4,0.6,0.8)*choose(-1,1);
hoverphase = 0;
yoff = 0;
</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 &amp;&amp; frozen == 0) {
if(state == 0)
{
if(statetime &lt; 11)
{
yVel = random_range(-1.5,-.5);
xVel = random_range(-1,1);
}
else if(statetime &gt; 10 &amp;&amp; statetime &lt; 60)
{
yVel = yVelStart;
xVel = xVelStart;
}
else state = 1;
}
if (state == 1 &amp;&amp; (distance_to_point(oCharacter.x, oCharacter.y-oCharacter.sprite_height/2) &lt; 160)) {
if (x &lt; targetx) {
hspeed += 0.06;
} else {
hspeed -= 0.06;
}
if (y &lt; targety) {
vspeed += 0.06;
} else vspeed -= 0.06;
}
else {
if(speed &gt; 0) speed -= 0.1;
if(hspeed &gt; 0) hspeed -= 0.1;
if(vspeed &gt; 0) vspeed -= 0.1;
}
if(state == 0) moveTo(xVel, yVel);
targetx = oCharacter.x;
targety = oCharacter.y - oCharacter.sprite_height/2;
}
if (state == 100) enemy_death();
if (y &gt; global.waterlevel &amp;&amp; global.waterlevel != 0) enemy_death();
clamp(speed, 0, 1.5);
clamp(vspeed, 0, 1.5);
clamp(hspeed, 0, 1.5);
if(hovertime &gt;= 1) hoverphase = 1;
else if(hovertime &lt;= -1) hoverphase = 0;
if(hoverphase == 1) hovertime -= 0.1;
else if(hoverphase == 0) hovertime += 0.1;
</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_death3();
}
</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(state == 0 &amp;&amp; distance_to_point(oCharacter.x, oCharacter.y-oCharacter.sprite_height/2) &lt; 160) draw_self();
else draw_sprite(sprite_index, image_index, x, y+hovertime)
</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>