main
maylokana 4 years ago
parent 4f009e78cd
commit 65748fb406

@ -5420,6 +5420,7 @@
<objects name="TimeTrial">
<object>objects\oTrialSelect</object>
<object>objects\oTrialClear</object>
<object>objects\oTrialReset</object>
<object>objects\oTrialGoal</object>
<object>objects\oTrialLogic</object>
<object>objects\oTrialAutoad</object>
@ -5870,6 +5871,7 @@
<rooms name="TimeTrial">
<room>rooms\trialselectroom</room>
<room>rooms\trialclearroom</room>
<room>rooms\trialresetroom</room>
<room>rooms\trialeditor</room>
<rooms name="Ingame">
<room>rooms\empty_room</room>

File diff suppressed because one or more lines are too long

@ -54,27 +54,27 @@ velocity_y = 0;
<kind>1</kind>
<string>// basic camera buttons
if (keyboard_check(ord("A"))){
velocity_x -= 0.25;
velocity_x -= 1;
}
if (keyboard_check(ord("D"))){
velocity_x += 0.25;
velocity_x += 1;
}
if (keyboard_check(ord("W"))){
velocity_y -= 0.25;
velocity_y -= 1;
}
if (keyboard_check(ord("S"))){
velocity_y += 0.25;
velocity_y += 1;
}
if (!keyboard_check(ord("A")) &amp;&amp; !keyboard_check(ord("D"))){
if !(velocity_x == 0){
if (velocity_x &gt; 0){
velocity_x -= 0.25;
velocity_x -= 1;
}else{
velocity_x += 0.25;
velocity_x += 1;
}
}
}
@ -82,9 +82,9 @@ if (!keyboard_check(ord("A")) &amp;&amp; !keyboard_check(ord("D"))){
if (!keyboard_check(ord("W")) &amp;&amp; !keyboard_check(ord("S"))){
if !(velocity_y == 0){
if (velocity_y &gt; 0){
velocity_y -= 0.25;
velocity_y -= 1;
}else{
velocity_y += 0.25;
velocity_y += 1;
}
}
}
@ -95,8 +95,10 @@ if ((instance_exists(oEditorInfo))){
}
// clamps
velocity_x = clamp(velocity_x,-3,3);
velocity_y = clamp(velocity_y,-3,3);
var x_t = 3;
if (keyboard_check(vk_shift)) then x_t = 9;
velocity_x = clamp(velocity_x,-x_t,x_t);
velocity_y = clamp(velocity_y,-x_t,x_t);
// move the camera!
x += velocity_x;
@ -106,7 +108,7 @@ y += velocity_y;
if (x &lt; 160) then x = 160;
if (x &gt; room_width-160) then x = room_width-160;
if (y &lt; 120) then y = 120;
if (y &gt; room_height-120) then x = room_height-120;
if (y &gt; room_height-120) then y = room_height-120;
</string>
</argument>
</arguments>

@ -31,10 +31,11 @@ keyboard_string = "";
bu[0] = c_white;
bu[1] = c_white;
create_button_alt(214,90,200,10,0,oTrialEditor.stage_name,0,bu[0]);
create_button_alt(214,110,200,10,1,oTrialEditor.stage_auth,1,bu[1]);
create_button_alt(214,80,200,10,0,oTrialEditor.stage_name,0,bu[0]);
create_button_alt(214,100,200,10,1,oTrialEditor.stage_auth,1,bu[1]);
create_button_alt(160,140,70,10,2,"Confirm",2,c_lime);
create_button_alt(232,130,80,10,3,"Toggle",2,c_aqua);
create_button_alt(160,160,70,10,2,"Confirm",2,c_lime);
relay_button = -1;
type_mode = -1;
@ -124,6 +125,13 @@ if (relay_button &gt; -1){
case 2: // perish
instance_destroy();
break;
case 3: // set hidden block
if (oTrialEditor.objs_hidden){
oTrialEditor.objs_hidden = 0;
}else{
oTrialEditor.objs_hidden = 1;
}
break;
}
relay_button = -1;
}
@ -176,8 +184,12 @@ draw_set_font(fontGUI2Default);
draw_set_color(c_white);
draw_set_halign(fa_right);
draw_set_valign(fa_center);
draw_text(80+x,90+y,"Level Name");
draw_text(80+x,110+y,"Level Author");
draw_text(80+x,80+y,"Level Name");
draw_text(80+x,100+y,"Level Author");
var s = "Enabled";
if (oTrialEditor.objs_hidden = false) then s = "Disabled";
draw_text(160+x,130+y,"Hidden Blocks: "+s);
</string>
</argument>
</arguments>

@ -124,8 +124,8 @@ global.tiptext = tip[global.curropt];
active = 0;
}
if (global.curropt == 1) {
//instance_create(50, 92, oOptionsReload);
//instance_destroy();
instance_create(50, 92, oOptionsReload);
instance_destroy();
}
if (global.curropt == 2) {
instance_create(50, 92, oOptionsMain);
@ -191,7 +191,6 @@ op1.label = get_text("PauseMenu", "Resume");
op2 = instance_create(x, y + 16, oPauseOption);
op2.optionid = 1;
op2.label = get_text("PauseMenu", "Restart");
op2.alarm[0] = 1;
op3 = instance_create(x, y + 32, oPauseOption);
op3.optionid = 2;
op3.label = get_text("PauseMenu", "Options");

@ -49,6 +49,8 @@
<argument>
<kind>1</kind>
<string>audio_stop_sound(sndMessage);
audio_stop_sound(sndSpinJump);
audio_stop_sound(sndSpaceJump);
sfx_play(sndMessage);
make_notification("New Item","Screw Attack Acquired",140,"","");
global.screwattack = 1;

@ -51,7 +51,7 @@
<string>audio_stop_sound(sndMessage);
sfx_play(sndMessage);
make_notification("New Item","Space Jump Acquired",140,"","");
global.screwattack = 1;
global.spacejump = 1;
instance_destroy();
</string>
</argument>

@ -32,6 +32,7 @@ instance_create(0,0,oEditorHelp);
cursor_active = 1;
placed_objs = 0;
objs_hidden = 1;
trial_tab_bottom = instance_create(160,225,oEditorTab);

@ -39,9 +39,12 @@ var grid = ds_grid_create(200,150);
// open the file yoinked from global.level_is
var file = file_text_open_read("stages/"+global.level_is);
// skip the strings, they aren't important
repeat (4){
repeat (3){
file_text_readln(file);
}
// get a var from the last one
var hdn = real(file_text_read_string(file));
file_text_readln(file);
// objs
while (!file_text_eof(file)){
@ -163,7 +166,9 @@ for (var i = 0; i &lt; 200; ++i;){
tile_add(tlTimeTrial,48,0,16,16,i*16,v*16,-100);
break;
case 4:
tile_add(tlTimeTrial,16,0,16,16,i*16,v*16,-122);
if (hdn){ // only make block sprites if hdn isn't false
tile_add(tlTimeTrial,16,0,16,16,i*16,v*16,-122);
}
break;
case 5: // spikes
var place = 0;
@ -203,6 +208,8 @@ for (var i = 0; i &lt; 200; ++i;){
}
// kill the grid because memory leaks are bad
ds_grid_destroy(grid);
// and kill the file because i didn't do that apparently..?
file_text_close(file);
</string>
</argument>
</arguments>

@ -0,0 +1,49 @@
<!--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>0</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>//remove_persistent_objects();
//global.ingame = 0;
start_trial();
</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>

@ -10,13 +10,7 @@
<persistent>0</persistent>
<colour>0</colour>
<showcolour>-1</showcolour>
<code>global.skip_mMenu = 0;
window_set_caption("AM2R: Time Trials");
/*
i genuinely have no idea why this resets to
"made in GMS" even though i set it otherwise but.. this will fix it
*/</code>
<code>global.skip_mMenu = 0;</code>
<enableViews>-1</enableViews>
<clearViewBackground>-1</clearViewBackground>
<clearDisplayBuffer>0</clearDisplayBuffer>

@ -0,0 +1,65 @@
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<room>
<caption></caption>
<width>320</width>
<height>240</height>
<vsnap>32</vsnap>
<hsnap>32</hsnap>
<isometric>0</isometric>
<speed>60</speed>
<persistent>0</persistent>
<colour>12632256</colour>
<showcolour>-1</showcolour>
<code></code>
<enableViews>0</enableViews>
<clearViewBackground>-1</clearViewBackground>
<clearDisplayBuffer>-1</clearDisplayBuffer>
<makerSettings>
<isSet>0</isSet>
<w>0</w>
<h>0</h>
<showGrid>0</showGrid>
<showObjects>0</showObjects>
<showTiles>0</showTiles>
<showBackgrounds>0</showBackgrounds>
<showForegrounds>0</showForegrounds>
<showViews>0</showViews>
<deleteUnderlyingObj>0</deleteUnderlyingObj>
<deleteUnderlyingTiles>0</deleteUnderlyingTiles>
<page>0</page>
<xoffset>0</xoffset>
<yoffset>0</yoffset>
</makerSettings>
<backgrounds>
<background visible="0" foreground="0" name="" x="0" y="0" htiled="-1" vtiled="-1" hspeed="0" vspeed="0" stretch="0"/>
<background visible="0" foreground="0" name="" x="0" y="0" htiled="-1" vtiled="-1" hspeed="0" vspeed="0" stretch="0"/>
<background visible="0" foreground="0" name="" x="0" y="0" htiled="-1" vtiled="-1" hspeed="0" vspeed="0" stretch="0"/>
<background visible="0" foreground="0" name="" x="0" y="0" htiled="-1" vtiled="-1" hspeed="0" vspeed="0" stretch="0"/>
<background visible="0" foreground="0" name="" x="0" y="0" htiled="-1" vtiled="-1" hspeed="0" vspeed="0" stretch="0"/>
<background visible="0" foreground="0" name="" x="0" y="0" htiled="-1" vtiled="-1" hspeed="0" vspeed="0" stretch="0"/>
<background visible="0" foreground="0" name="" x="0" y="0" htiled="-1" vtiled="-1" hspeed="0" vspeed="0" stretch="0"/>
<background visible="0" foreground="0" name="" x="0" y="0" htiled="-1" vtiled="-1" hspeed="0" vspeed="0" stretch="0"/>
</backgrounds>
<views>
<view visible="0" objName="" xview="0" yview="0" wview="1024" hview="768" xport="0" yport="0" wport="1024" hport="768" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="" xview="0" yview="0" wview="1024" hview="768" xport="0" yport="0" wport="1024" hport="768" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="" xview="0" yview="0" wview="1024" hview="768" xport="0" yport="0" wport="1024" hport="768" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="" xview="0" yview="0" wview="1024" hview="768" xport="0" yport="0" wport="1024" hport="768" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="" xview="0" yview="0" wview="1024" hview="768" xport="0" yport="0" wport="1024" hport="768" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="" xview="0" yview="0" wview="1024" hview="768" xport="0" yport="0" wport="1024" hport="768" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="" xview="0" yview="0" wview="1024" hview="768" xport="0" yport="0" wport="1024" hport="768" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
<view visible="0" objName="" xview="0" yview="0" wview="1024" hview="768" xport="0" yport="0" wport="1024" hport="768" hborder="32" vborder="32" hspeed="-1" vspeed="-1"/>
</views>
<instances>
<instance objName="oTrialReset" x="0" y="0" name="inst_33B7D584" locked="0" code="" scaleX="1" scaleY="1" colour="4294967295" rotation="0"/>
</instances>
<tiles/>
<PhysicsWorld>0</PhysicsWorld>
<PhysicsWorldTop>0</PhysicsWorldTop>
<PhysicsWorldLeft>0</PhysicsWorldLeft>
<PhysicsWorldRight>1024</PhysicsWorldRight>
<PhysicsWorldBottom>768</PhysicsWorldBottom>
<PhysicsWorldGravityX>0</PhysicsWorldGravityX>
<PhysicsWorldGravityY>10</PhysicsWorldGravityY>
<PhysicsWorldPixToMeters>0.100000001490116</PhysicsWorldPixToMeters>
</room>

@ -14,6 +14,12 @@ if (load != ""){
file_text_readln(file);
stage_id = file_text_read_string(file);
file_text_readln(file);
var s = file_text_read_string(file);
if (s == ""){
objs_hidden = 1;
}else{
objs_hidden = real(s);
}
file_text_readln(file);
// objs

@ -24,6 +24,7 @@ file_text_write_string(file,stage_auth);
file_text_writeln(file);
file_text_write_string(file,stage_id);
file_text_writeln(file);
file_text_write_string(file,string(objs_hidden));
file_text_writeln(file);
// save all the objects. ALL. OF. THEM. and then pray it doesn't break

Loading…
Cancel
Save