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

204 lines
6.0 KiB
XML

<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
<spriteName>&lt;undefined&gt;</spriteName>
<solid>0</solid>
<visible>-1</visible>
<depth>-150</depth>
<persistent>0</persistent>
<parentName>oLiquid</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>xoffset = 0;
yoffset = 0;
wtime = 0;
frame = 0;
bg = bgWater0;
alarm[1] = 1;
spr_alpha = 0.4;
widescreen = oControl.widescreen;
widescreen_space = oControl.widescreen_space;
</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>frame += 1;
if (frame &gt; 3) frame = 0;
if (frame == 0) bg = bgWater0;
if (frame == 1) bg = bgWater1;
if (frame == 2) bg = bgWater2;
if (frame == 3) bg = bgWater1;
alarm[1] = 10;
</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>xoffset -= 1;
if (xoffset &lt; -32) xoffset = 0;
alarm[0] = 5;
</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 (wave) {
wtime += wspeed;
yoffset -= cos(wtime) * wheight;
}
if (instance_exists(oCharacter)) {
if (oCharacter.inwater) {
if (spr_alpha &gt; 0.1) spr_alpha -= 0.01;
} else if (spr_alpha &lt; 0.4) spr_alpha += 0.01;
}
</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 (instance_exists(oCharacter)) {
if (oCharacter.inwater || (oCharacter.y &gt; global.waterlevel + oWater.yoffset)) {
spr_alpha = 0.1;
}
}
</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 ((view_yview[0] + view_hview[0]) &gt;= (global.waterlevel + yoffset)) {
i = 0;
draw_set_color(make_colour_rgb(10, 10, 80));
draw_set_blend_mode(bm_add);
draw_rectangle(view_xview[0] - (widescreen_space/2), global.waterlevel + oWater.yoffset, view_xview[0] + 320 + widescreen_space/2, view_yview[0] + 250, false);
repeat ((room_width / 32) + 1 + (4*widescreen)) {
if (((i * 32) &gt;= (view_xview[0] - 33 - (widescreen_space/2))) &amp;&amp; ((i * 32) &lt; (view_xview[0] + 360 + (widescreen_space))) &amp;&amp; global.waterlevel + yoffset + 224 &gt; view_yview[0]) draw_background_ext(bg, x + i * 32 + xoffset - (widescreen_space/2), global.waterlevel + yoffset, 1, 1, 0, -1, spr_alpha);
i += 1;
}
draw_set_blend_mode(bm_normal);
}
</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>