You've already forked AM2R-Community-Updates
mirror of
https://github.com/izzy2lost/AM2R-Community-Updates.git
synced 2026-03-10 11:23:35 -07:00
185 lines
5.9 KiB
XML
185 lines
5.9 KiB
XML
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
|
|
<object>
|
|
<spriteName><undefined></spriteName>
|
|
<solid>0</solid>
|
|
<visible>-1</visible>
|
|
<depth>-500000</depth>
|
|
<persistent>-1</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>/// Replay playback object
|
|
filename = "rec.txt";
|
|
control_state = "";
|
|
last_state = "0";
|
|
control_read = "";
|
|
frame_read = 0;
|
|
frame = 0;
|
|
control_read[30000] = 0;
|
|
if (!file_exists(filename)) {
|
|
popup_text("File not found");
|
|
instance_destroy();
|
|
} else {
|
|
fid = file_text_open_read(filename);
|
|
start_room = file_text_read_real(fid);
|
|
file_text_readln(fid);
|
|
start_x = file_text_read_real(fid);
|
|
file_text_readln(fid);
|
|
start_y = file_text_read_real(fid);
|
|
file_text_readln(fid);
|
|
start_state = file_text_read_real(fid);
|
|
file_text_readln(fid);
|
|
start_facing = file_text_read_real(fid);
|
|
file_text_readln(fid);
|
|
while (!file_text_eof(fid)) {
|
|
frame_read = file_text_read_real(fid);
|
|
file_text_readln(fid);
|
|
control_read[frame_read] = file_text_read_string(fid);
|
|
file_text_readln(fid);
|
|
}
|
|
control_read[frame_read + 1] = "EOF";
|
|
file_text_close(fid);
|
|
random_set_seed(1);
|
|
global.targetx = start_x;
|
|
global.offsetx = 0;
|
|
global.targety = start_y;
|
|
global.offsety = 0;
|
|
global.camstartx = start_x;
|
|
global.camstarty = start_y;
|
|
room_goto(start_room);
|
|
popup_text("Playback Start");
|
|
} // if (!file_exists(filename)) else
|
|
</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 (string_length(control_read[frame]) > 0) {
|
|
if (control_read[frame] == "EOF") {
|
|
popup_text("Playback Finished");
|
|
instance_destroy();
|
|
exit;
|
|
}
|
|
if (control_state != last_state) control_state = control_read[frame];
|
|
}
|
|
oControl.kLeft = real(string_char_at(control_state, 1));
|
|
oControl.kRight = real(string_char_at(control_state, 2));
|
|
oControl.kUp = real(string_char_at(control_state, 3));
|
|
oControl.kDown = real(string_char_at(control_state, 4));
|
|
oControl.walk_zone = real(string_char_at(control_state, 5));
|
|
oControl.kJump = real(string_char_at(control_state, 6));
|
|
oControl.kFire = real(string_char_at(control_state, 7));
|
|
oControl.kMissile = real(string_char_at(control_state, 8));
|
|
oControl.kAim = real(string_char_at(control_state, 9));
|
|
oControl.kAim2 = real(string_char_at(control_state, 10));
|
|
oControl.kSelect = real(string_char_at(control_state, 11));
|
|
oControl.kStart = real(string_char_at(control_state, 12));
|
|
oControl.kWalk = real(string_char_at(control_state, 13));
|
|
oControl.kMorph = real(string_char_at(control_state, 14));
|
|
oControl.kMenu1 = real(string_char_at(control_state, 15));
|
|
oControl.kMenu2 = real(string_char_at(control_state, 16));
|
|
frame += 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>draw_set_font(fontMenuSmall);
|
|
draw_set_alpha(1);
|
|
draw_text_shadow(view_xview[0] + 8, view_yview[0] + 120, control_state);
|
|
draw_text_shadow(view_xview[0] + 8, view_yview[0] + 136, string(frame));
|
|
</string>
|
|
</argument>
|
|
</arguments>
|
|
</action>
|
|
</event>
|
|
<event eventtype="9" enumb="120">
|
|
<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>popup_text("Playback Stopped");
|
|
instance_destroy();
|
|
</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>
|