Files
AM2R-Community-Updates/objects/oCharacter.object.gmx
2020-12-22 20:54:55 -06:00

720 lines
20 KiB
XML

<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
<spriteName>sMapPlayer</spriteName>
<solid>0</solid>
<visible>-1</visible>
<depth>1</depth>
<persistent>-1</persistent>
<parentName>&lt;undefined&gt;</parentName>
<maskName>sMask1</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>characterCreateEvent();
mAnimSpd = 0;
activation_code = false;
// DEBUG
//instance_create(x, y-90, oAreaIntro);
</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>surface_free(surf);
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="2" 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>activation_code = true;
alarm[11] = 12;
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="2" 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>/// Gravity suit change
if (global.SuitChange) {
event_user(0);
}
else {
global.currentsuit = 2;
}
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="2" enumb="3">
<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>/// Enable control
global.enablecontrol = 1;
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="2" 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>/// Stop speed boost audio
if (speedboost) {
sfx_stop(sndSBStart);
sfx_loop(sndSBLoop);
}
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="2" enumb="1">
<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>/// Suit change
if (global.SuitChange) {
if(global.currentsuit == 0) event_user(0);
}
else scr_variasuitswap();
</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>/// start player death transition
with (oControl) event_user(1);
</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>/// Surface drawing
if (facing == RIGHT || facing == 0) mirror = 1;
if (facing == LEFT) mirror = -1;
draw_character_to_surface();
if (global.godmode) {
global.missiles = global.maxmissiles;
global.smissiles = global.maxsmissiles;
global.pbombs = global.maxpbombs;
global.playerhealth = global.maxhealth;
}
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="3" enumb="1">
<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>/// Activation/deactivation
if(activation_code) {
instance_activate_region(view_xview[0] - 300, view_yview[0] - 300, view_wview[0] + 600, view_hview[0] + 600, 1);
if (global.objdeactivate) instance_deactivate_object(oSolid);
instance_activate_object(oMovingSolid);
if (global.objdeactivate) instance_deactivate_object(oEnemy);
instance_deactivate_object(oGotoRoom);
instance_activate_region(view_xview[0] - 200, view_yview[0] - 200, view_wview[0] + 400, view_hview[0] + 400, 1);
instance_activate_region(x - 64, y - 64, 128, 128, 1);
instance_activate_object(oGravitt);
activation_code = false;
}
</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 (global.currentsuit == 2) { visible = false; }
//else if (visible == false) { visible = true; }
var block_id;
if (room != rm_transition) {
characterStepEvent();
prevmapposx = global.mapposx;
prevmapposy = global.mapposy;
global.myposx = floor(x / 320);
global.myposy = floor((y - 8) / 240);
global.mapposx = global.myposx + global.mapoffsetx;
global.mapposy = global.myposy + global.mapoffsety;
if (global.dmap[global.mapposx, global.mapposy] == 0) global.dmap[global.mapposx, global.mapposy] = 1;
if (prevmapposx != global.mapposx || prevmapposy != global.mapposy) with (oControl) event_user(2);
} else image_speed = 0;
//
block_id = -4;
if (instance_exists(oBlockStep)) {
if (platformCharacterIs(ON_GROUND)) {
if (dash == 0) {
block_id = collision_line(x - 6, y + 1, x + 6, y + 1, oBlockStep, false, true);
} else {
block_id = collision_point(x, y + 1, oBlockStep, false, true);
if (block_id != -4 &amp;&amp; y &lt; block_id.y + 2) with (block_id) sboost = 1;
}
if (block_id != -4 &amp;&amp; y &lt; block_id.y + 2) with (block_id) event_user(0);
} else if (state == GRIP) {
if (facing == RIGHT) {
block_id = collision_point(x + 8, y - 24, oBlockStep, false, true);
} else block_id = collision_point(x - 8, y - 24, oBlockStep, false, true);
if (block_id != -4) with (block_id) event_user(0);
}
}
//
if (instance_exists(empspark)) {
if (turning == 0 &amp;&amp; morphing == 0 &amp;&amp; unmorphing == 0 &amp;&amp; walljumping == 0
&amp;&amp; (state == STANDING || state == RUNNING || state == DUCKING || state == JUMPING &amp;&amp; vjump == 1)
|| state == GRIP &amp;&amp; (facing == RIGHT &amp;&amp; aimdirection != 0 || facing == LEFT &amp;&amp; aimdirection != 1)
) {
empspark.x = x + aspr2x;
empspark.y = y + aspr2y;
}
}
</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 ((state == BALL || state == AIRBALL || state == SPIDERBALL) &amp;&amp; other.image_index == 1 &amp;&amp; monster_drain == 0) {
if (isCollisionTop(6) == 0) {
yVel = -5;
} else if (isCollisionTop(5) == 0) {
yVel = -4;
} else if (isCollisionTop(4) == 0) {
yVel = -3;
} else if (isCollisionTop(3) == 0) {
yVel = -2;
} else if (isCollisionTop(2) == 0) {
yVel = -1;
}
state = AIRBALL;
sball = 0;
statetime = 0;
if (x &lt; other.x - 2) {
facing = LEFT;
fixedx = 12;
}
if (x &gt; other.x + 2) {
facing = RIGHT;
fixedx = 12;
}
fixedy = 20;
}
</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>/// GravitySuitChangeFX
instance_create(160, 160, oGravitySuitChangeFX);
state = IDLE;
facing = 0;
juststarted = 150;
canrun = 0;
xVel = 0;
yVel = 0;
</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>/// SuitChangeFX
instance_create(x, y, oSuitChangeFX);
state = IDLE;
facing = 0;
juststarted = 400;
canrun = 0;
xVel = 0;
yVel = 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 (turning == 1) turning = 0;
if (landing == 1) landing = 0;
if (morphing == 1) morphing = 0;
if (unmorphing == 1) unmorphing = 0;
if (walljumping == 1) {
walljumping = 0;
if (aimlock == 0) canturn = 1;
yVel = -6 + (inwater &amp;&amp; global.currentsuit != 2) * 1.5;
if (facing == LEFT) {
xAcc = -2;
x -= 2;
}
if (facing == RIGHT) {
xAcc = 2;
x += 2;
}
image_index = 2;
statetime = 0;
hijump = 1;
LoopSoundMono(spinjump_sound);
}
if (state == JUMPING &amp;&amp; vjump == 1) {
image_single = 4;
image_speed = 0;
}
if (state == BRAKING) {
state = STANDING;
statetime = 0;
if (aimlock == 0) canturn = 1;
}
if (state == SJSTART) {
image_index = 3;
image_speed = 0;
}
if (state == SUPERJUMP &amp;&amp; sjdir == 0) {
image_index = 1;
}
if (state == HURT) {
if (sjball == 0) {
state = JUMPING;
vjump = 1;
}
if (sjball == 1) state = AIRBALL;
statetime = 20;
if (aimlock == 0) canturn = 1;
sjball = 0;
cmhurt = 20;
}
if (state == IDLE &amp;&amp; facing != 0) {
canrun = 1;
state = RUNNING;
statetime = 0;
}
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="7" enumb="5">
<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>sfx_stop(sndXMorph1);
sfx_stop(sndAbsorbX);
</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 (room != rm_transition) {
x = global.targetx + global.offsetx;
y = global.targety + global.offsety;
if (global.event[304] == 1) {
if (!instance_exists(oHatchling) &amp;&amp; !instance_exists(oHatchlingIntro)) {
instance_create(x, y - 16, oHatchling);
}
}
if (oControl.mod_earlybaby == 1 &amp;&amp; global.event[304] == 0 &amp;&amp; !instance_exists(oHatchling) &amp;&amp; room_get_name(room) != 'rm_a7c01') instance_create(x, y - 16, oHatchling);
spawn_random_septogg(1, max(1, floor(room_width/500), floor(room_height/500)), 18);
alarm[11] = 1;
}
xGlow = 0;
</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>characterDrawEvent();
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="9" enumb="36">
<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 (file_exists(working_directory + "\cheats\godemode"))
{
if (global.godmode == 0) { global.godmode = 1; }
else global.godmode = 0
}
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="9" enumb="34">
<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 (file_exists(working_directory + "\cheats\fusion"))
{
if (oControl.mod_fusion == 1) oControl.mod_fusion = 0;
else oControl.mod_fusion = 1;
}
/*if (file_exists(working_directory + "\cheats\itemprintout")) scr_ini_write();
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="9" enumb="33">
<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>//Just used for debugging. Used to force a breakpoint.
var t = 0;
</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>