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.
165 lines
5.5 KiB
165 lines
5.5 KiB
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
|
|
<object>
|
|
<spriteName>sChargeBeamSpark1</spriteName>
|
|
<solid>0</solid>
|
|
<visible>-1</visible>
|
|
<depth>-50</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>image_speed = 0.5;
|
|
sprite_index = sChargeBeamSpark1;
|
|
if (global.wbeam) sprite_index = sChargeWBeamSpark1;
|
|
if (global.pbeam) sprite_index = sChargePBeamSpark1;
|
|
if (global.ibeam) sprite_index = sChargeIBeamSpark1;
|
|
</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 (!instance_exists(oCharacter)) {
|
|
instance_destroy();
|
|
exit;
|
|
}
|
|
if (oCharacter.chargebeam == 0) {
|
|
instance_destroy();
|
|
} else {
|
|
x = oCharacter.x + oCharacter.aspr2x;
|
|
y = oCharacter.y + oCharacter.aspr2y;
|
|
if (oCharacter.aimdirection == 0) x += 2;
|
|
if (oCharacter.aimdirection == 1) x -= 2;
|
|
if (oCharacter.aimdirection == 2) {
|
|
x += 3;
|
|
y -= 3;
|
|
}
|
|
if (oCharacter.aimdirection == 3) {
|
|
x -= 3;
|
|
y -= 3;
|
|
}
|
|
if (oCharacter.aimdirection == 4) {
|
|
x += 3;
|
|
y += 3;
|
|
}
|
|
if (oCharacter.aimdirection == 5) {
|
|
x -= 3;
|
|
y += 3;
|
|
}
|
|
if (oCharacter.aimdirection == 6) y -= 2;
|
|
if (oCharacter.aimdirection == 7) y += 2;
|
|
if (oCharacter.chargebeam >= 1) {
|
|
if (sprite_index == sChargeBeamSpark1) sprite_index = sChargeBeamSpark1B;
|
|
if (sprite_index == sChargeWBeamSpark1) sprite_index = sChargeWBeamSpark1B;
|
|
if (sprite_index == sChargePBeamSpark1) sprite_index = sChargePBeamSpark1B;
|
|
if (sprite_index == sChargeIBeamSpark1) sprite_index = sChargeIBeamSpark1B;
|
|
}
|
|
if (instance_number(oChargeBeamSpark2) < 4) instance_create(x + 30 - random(60), y + 30 - random(60), oChargeBeamSpark2);
|
|
} // if (oCharacter.chargebeam == 0) else
|
|
if (instance_exists(oPickup) && oCharacter.chargebeam >= true) with (oPickup) {
|
|
if (distance_to_object(oChargeBeamSpark1) < 100) {
|
|
var spd = clamp(120/distance_to_point(oCharacter.x,oCharacter.y-20),1,3);
|
|
x += lengthdir_x(spd,point_direction(x,y,oCharacter.x,oCharacter.y-20));
|
|
y += lengthdir_y(spd,point_direction(x,y,oCharacter.x,oCharacter.y-20));
|
|
}
|
|
/*if (distance_to_object(oChargeBeamSpark1) < 100) {
|
|
if (oCharacter.x > x) {
|
|
x += 1;
|
|
} else x -= 1;
|
|
if (oCharacter.y - 20 > y) {
|
|
y += 1;
|
|
} else y -= 1;
|
|
}
|
|
if (distance_to_object(oChargeBeamSpark1) < 70) {
|
|
if (oCharacter.x > x) {
|
|
x += 1;
|
|
} else x -= 0.5;
|
|
if (oCharacter.y - 20 > y) {
|
|
y += 1;
|
|
} else y -= 0.5;
|
|
}
|
|
if (distance_to_object(oChargeBeamSpark1) < 40) {
|
|
if (oCharacter.x > x) {
|
|
x += 1;
|
|
} else x -= 0.5;
|
|
if (oCharacter.y - 20 > y) {
|
|
y += 1;
|
|
} else y -= 0.5;
|
|
}*/
|
|
} // if (instance_exists(oPickup) && oCharacter.chargebeam >= true)
|
|
</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 == sChargeBeamSpark1 || sprite_index == sChargeWBeamSpark1 || sprite_index == sChargePBeamSpark1 || sprite_index == sChargeIBeamSpark1) image_index = 12;
|
|
</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>
|