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-Item-Roulette/objects/oCoreXGravity.object.gmx

193 lines
5.4 KiB

<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
<spriteName>sCoreXGravity</spriteName>
<solid>0</solid>
<visible>-1</visible>
<depth>-11</depth>
<persistent>0</persistent>
<parentName>&lt;undefined&gt;</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>image_speed = 0.16;
absorb = false;
statetime = 0;
screwattackpickupframe = irandom(4);
screwattackpickupangle = irandom(359);
screwattackpickupfx = 0;
relativeX = x - oCharacter.x;
relativeY = y - (oCharacter.y-oCharacter.sprite_height/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>if(!absorb){
relativeX = lerp(relativeX, 0, 0.03);
relativeY = lerp(relativeY, 0, 0.03);
x = oCharacter.x + relativeX;
y = (oCharacter.y-oCharacter.sprite_height/2) + relativeY;
}
if(absorb){
if(statetime == 0){
global.enablecontrol = 0;
with (oCharacter) {
fxtimer = other.screwattackpickupfx;
speedmultiplier = 0;
speedmultiresettimer = 10000;
kLeft = 0;
kRight = 0;
kUp = 0;
kDown = 0;
kJump = 0;
kJumpPressed = 0;
kRun = 0;
kAim = 0;
kFire = 0;
kMissile = 0;
charge = 0;
Mute_Loops();
}
with(oFXTrail) {
if(sprite_index == sScrewSpark) visible = false;
}
image_xscale = 1;
image_xscale = 1;
with (oCharacter) {
speedmultiplier = 0;
speedmultiresettimer = 10000;
sfx_stop(sndCoreXIdle);
alarm[0]=-1;
Mute_Loops();
}
}
x = oCharacter.x + relativeX;
y = (oCharacter.y-oCharacter.sprite_height/2) + relativeY;
relativeX = lerp(relativeX, 0, 0.1);
relativeY = lerp(relativeY, 0, 0.1);
if(image_xscale &gt; 0) {
image_xscale -= 0.0225;
image_yscale -= 0.0225;
}
if(image_xscale &lt;= 0) {
if(room == rm_a2a04) {
}
else {
Unmute_Loops();
}
with (oCharacter) speedmultiresettimer = 0;
global.enablecontrol = 1;
if(global.item[9] == 0){
global.item[9] = 1;
global.currentsuit = 2;
}
with(instance_find(oFXTrail, instance_number(oFXTrail) - 1)) {
if(sprite_index == sScrewSpark) {
visible = true;
sprite_index = sScrewAttack;
image_index = other.screwattackpickupframe;
image_alpha = 1;
image_angle = other.screwattackpickupangle;
image_blend = c_white;
image_xscale = 1;
image_yscale = 1;
}
}
instance_destroy();
}
}
statetime++;
</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(!absorb){
PlaySoundMono(sndAbsorbX);
with(instance_create(oCharacter.x,oCharacter.y-oCharacter.sprite_height/2,oAbsorbX)) core = true;
screwattackpickupfx = oCharacter.fxtimer;
absorb = true;
statetime = 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>0</PhysicsObjectKinematic>
<PhysicsShapePoints/>
</object>