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

302 lines
9.2 KiB

<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
<spriteName>sSkreekA6</spriteName>
<solid>0</solid>
<visible>-1</visible>
<depth>0</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();
myhealth = 10;
damage = 30;
hitsound = sndEHit2;
deathsound = sndEDeath2;
platyoffset = -6;
frozenspr = sSkreekA6_frozen;
flipx = 1;
state = 0;
active = 0;
spit = 0;
cooldown = 0;
if (x &gt;= oCharacter.x) facing = -1;
if (x &lt; oCharacter.x) facing = 1;
image_speed = 0.2; // originally 0.25
// Trap trigger
trigger = 0;
launch = 0;
</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(oLavaSurface)) sprite_index = sSkreekGlow;
</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(80);
enemy_target_check(128, 1);
// Trap launch
if ((trigger != 0) &amp;&amp; (launch == 0)) {
target = 0;
} else if (launch == trigger) {
enemy_target_check(128, 1);
} else if (trigger != 0) {
target = 0;
}
if (stun == 0 &amp;&amp; frozen == 0) {
if (state == 0) {
canbehit = 0;
hitscrewattack = 0;
if (irandom(50) == 1) {
var bubble = instance_create(x, y, oLBubble);
if (instance_exists(bubble)) {
bubble.hspeed = random_range(-1, 1);
bubble.vspeed = -random(0.4);
}
}
}
if ((target == 1) &amp;&amp; (state == 0) &amp;&amp; (cooldown &lt;= 0)) {
canbehit = 1;
hitscrewattack = 1;
if (x &gt;= oCharacter.x) {
facing = -1;
image_angle = 270;
}
if (x &lt; oCharacter.x) {
facing = 1;
image_angle = 90;
}
vspeed = -6;
state = 1;
}
if (state == 1) {
vspeed += 0.12;
if ((vspeed &gt;= -2.8) &amp;&amp; (floor(image_angle) != abs(180*(sign(facing)-1)))) {
image_angle -= sign(facing)*5; //lerp(image_angle, 90*abs(sign(facing)-1), 0.1);
if (spit == 0) {
sprite_index = sSkreekA6_spit;
frozenspr = sSkreekA6_spit_frozen;
//image_speed = 0.1;
image_index = 0;
spit = 1;
}
}
if ((spit &gt;= 1) &amp;&amp; (vspeed &gt;= 0.6) &amp;&amp; (spit &lt; 27)) {
spit ++;
if (((spit mod 13) == 0) &amp;&amp; (image_index &gt; 2)) {
var proj = instance_create(x, y, oSkreekSpit);
proj.speed = 3;
proj.direction = 90*abs(sign(facing)-1);
proj.image_angle = proj.direction;
/*else { // hard/fusion spit THIS DIDN'T WORK
var proj = instance_create(x, y, oSkreekSpit);
proj.speed = 3;
proj.direction = (90*abs(sign(facing)-1)) + 15;
proj.image_angle = proj.direction;
//proj.image_xscale = facing;
var proj2 = instance_create(x, y, oSkreekSpit);
proj2.speed = 3;
proj2.direction = (90*abs(sign(facing)-1)) - 15;
proj2.image_angle = proj2.direction;
//proj2.image_xscale = facing;
}*/
}
}
}
if ((y &gt; ystart) &amp;&amp; (state != 0)) { // return to waiting phase
sprite_index = sSkreekA6;
frozenspr = sSkreekA6_frozen;
image_speed = 0.2;
vspeed = 0;
y = ystart;
cooldown = 60;
state = 0;
spit = 0;
}
} else speed = 0;
if (cooldown &gt; 0) {
cooldown --;
}
if (state == 100) enemy_death();
</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 (other.speedboost &gt; 0) {
state = 100;
enemy_death3();
}
dodamage = 1;
if (state == 0 || frozen &gt; 0 || other.state == 30 || other.state == 31 || other.state == 29 || other.speedboost &gt; 0 || other.state == 15 &amp;&amp; other.vjump == 0 &amp;&amp; global.screwattack == 1) dodamage = 0;
if (state == 100 || other.dash &gt;= 29) dodamage = 0;
if (other.inwater == 1 &amp;&amp; other.state == 15 &amp;&amp; other.vjump == 0 &amp;&amp; global.screwattack == 1 &amp;&amp; global.currentsuit != 2) dodamage = 1; //added
if (hitpseudoscrew == 1 &amp;&amp; other.chargebeam &gt;= 1 &amp;&amp; other.state == 15 &amp;&amp; other.vjump == 0 &amp;&amp; global.screwattack == 0) {
event_user(0);
if (myhealth &lt;= 0) state = 100;
other.chargebeam = 0;
other.nofire = 20;
dodamage = 0;
repeat (8) {
spark = instance_create(x, y, oFXTrail);
spark.additive = 1;
spark.fadespeed = 0.05;
spark.direction = point_direction(x, y - 8, oCharacter.x, oCharacter.y - 12) - 4 + random(8) + 90;
spark.speed = 1 + random(4);
if (random(2) &lt; 1) spark.direction += 180;
spark.sprite_index = sChargeBeamSpark2;
if (global.wbeam) spark.sprite_index = sChargeWBeamSpark2;
if (global.pbeam) spark.sprite_index = sChargePBeamSpark2;
if (global.ibeam) spark.sprite_index = sChargeIBeamSpark2;
}
}
if (dodamage == 1) damage_player(damage, hpush, vpush, 0, 0);
</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 (sprite_index == sSkreekA6_spit) {
image_speed = 0;
image_index = 3;
}
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="7" 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>instance_destroy();
</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>