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

223 lines
6.7 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>-10</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>x = global.mapposx * 8;
y = global.mapposy * 8;
y += 32;
view_xview[0] = x - 160;
view_yview[0] = y - 120;
image_speed = 0.2;
visible = false;
alarm[0] = 2;
active = 0;
alarm[1] = 5;
state = 0;
if (global.mapmarker == 1) {
state = 2;
marker = instance_create(x, y, oMapMarker);
marker.editing = 0;
} else state = 0;
keycounter = 0;
camera = instance_create(x + 4, y + 4, oMapCamera);
view_object[0] = camera;
</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>with (oControl) event_user(2);
with (camera) instance_destroy();
if (global.mapmarker == 1) with (marker) instance_destroy();
view_xview[0] = 0;
view_yview[0] = 0;
</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>active = 1;
</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>visible = true;
</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 (image_alpha &gt; -1) image_alpha -= 0.02;
if (image_alpha &lt;= 0) image_alpha = 1;
if (active) {
if (state == 0 || state == 2) {
oSS_Control.canchange = 1;
if (oControl.kMenu1 &amp;&amp; oControl.kMenu1PushedSteps == 0) {
if (state == 0) {
global.mapmarkerx = global.mapposx;
global.mapmarkery = global.mapposy;
global.mapmarker = 1;
marker = instance_create(x, y, oMapMarker);
}
marker.editing = 1;
state = 1;
sfx_play(sndMenuMove);
exit;
}
depth = -10;
}
if (state == 1) {
oSS_Control.canchange = 0;
if (oControl.kUp &gt; 0 &amp;&amp; keycounter == 1) {
global.mapmarkery -= 1;
if (global.mapmarkery &lt; 3) global.mapmarkery = 3;
with (marker) event_user(0);
}
if (oControl.kDown &gt; 0 &amp;&amp; keycounter == 1) {
global.mapmarkery += 1;
if (global.mapmarkery &gt; 59) global.mapmarkery = 59;
with (marker) event_user(0);
}
if (oControl.kLeft &gt; 0 &amp;&amp; keycounter == 1) {
global.mapmarkerx -= 1;
if (global.mapmarkerx &lt; 3) global.mapmarkerx = 3;
with (marker) event_user(0);
}
if (oControl.kRight &gt; 0 &amp;&amp; keycounter == 1) {
global.mapmarkerx += 1;
if (global.mapmarkerx &gt; 76) global.mapmarkerx = 76;
with (marker) event_user(0);
}
if (oControl.kMenu1 &amp;&amp; oControl.kMenu1PushedSteps == 0) {
state = 2;
marker.editing = 0;
with (camera) event_user(0);
sfx_play(sndMenuMove);
exit;
}
if (oControl.kMenu2 &amp;&amp; oControl.kMenu2PushedSteps == 0) {
state = 0;
global.mapmarker = 0;
with (marker) instance_destroy();
with (camera) event_user(0);
sfx_play(sndMenuMove);
}
depth = -5;
} // if (state == 1)
if (state == 1 &amp;&amp; (oControl.kUp &gt; 0 || oControl.kDown &gt; 0 || oControl.kLeft &gt; 0 || oControl.kRight &gt; 0)) {
keycounter += 1;
if (keycounter &gt; 8) keycounter = 0;
} else keycounter = 0;
} // if (active)
</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>