level editor, level playing and hud changes

main
maylokana 4 years ago
parent 0634c042f3
commit 61c264ee51

@ -1405,6 +1405,10 @@
<sound>sound\sndSkorpBlade</sound>
<sound>sound\sndYumboDash</sound>
</sounds>
<sounds name="TimeTrials">
<sound>sound\sItemSelect</sound>
<sound>sound\sItemPlace</sound>
</sounds>
</sounds>
<sprites name="sprites">
<sprites name="Pickups">
@ -3400,6 +3404,8 @@
<sprite>sprites\sEditorCursor</sprite>
<sprite>sprites\sEditorTab</sprite>
<sprite>sprites\sEditorStart</sprite>
<sprite>sprites\sEditorStartIcon</sprite>
<sprite>sprites\sGoal</sprite>
</sprites>
</sprites>
<backgrounds name="background">
@ -4354,6 +4360,13 @@
<script>scripts\input_display.gml</script>
<script>scripts\get_obj_count.gml</script>
<script>scripts\trials_check_save.gml</script>
<script>scripts\create_button.gml</script>
<script>scripts\create_button_alt.gml</script>
<script>scripts\editor_message.gml</script>
<script>scripts\editor_save.gml</script>
<script>scripts\editor_load.gml</script>
<script>scripts\generate_id.gml</script>
<script>scripts\get_stage_data.gml</script>
</scripts>
</scripts>
<shaders name="shaders">
@ -5406,6 +5419,7 @@
<object>objects\oTrialLogic</object>
<object>objects\oTrialAutoad</object>
<object>objects\oTTBooster</object>
<object>objects\oTTScrew</object>
<object>objects\oTTHijump</object>
<object>objects\oTTPGrip</object>
<object>objects\oTTBomb</object>
@ -5417,6 +5431,10 @@
<object>objects\oEditorCamera</object>
<object>objects\oEditorSolid</object>
<object>objects\oEditorTab</object>
<object>objects\oEditorButton</object>
<object>objects\oInfoButton</object>
<object>objects\oEditorInfo</object>
<object>objects\oEditorHelp</object>
</objects>
</objects>
<timelines name="timelines">

@ -1,8 +1,8 @@
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<background>
<istileset>0</istileset>
<tilewidth>0</tilewidth>
<tileheight>0</tileheight>
<tilewidth>1</tilewidth>
<tileheight>1</tileheight>
<tilexoff>0</tilexoff>
<tileyoff>0</tileyoff>
<tilehsep>0</tilehsep>

@ -1,8 +1,8 @@
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<background>
<istileset>0</istileset>
<tilewidth>0</tilewidth>
<tileheight>0</tileheight>
<tilewidth>1</tilewidth>
<tileheight>1</tileheight>
<tilexoff>0</tilexoff>
<tileyoff>0</tileyoff>
<tilehsep>0</tilehsep>

@ -1,8 +1,8 @@
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<background>
<istileset>0</istileset>
<tilewidth>0</tilewidth>
<tileheight>0</tileheight>
<tilewidth>1</tilewidth>
<tileheight>1</tileheight>
<tilexoff>0</tilexoff>
<tileyoff>0</tileyoff>
<tilehsep>0</tilehsep>

@ -343,6 +343,10 @@ if (instance_exists(empspark)) {
empspark.y = y + aspr2y;
}
}
// kill player if they go out of bounds
if (y &gt; room_height+64){
damage_player(50000,0,0,true,true);
}
</string>
</argument>
</arguments>

@ -30,6 +30,12 @@ image_index = 0;
state = 0;
statetime = 0;
type = 0;
// a really stupid hack to make tiles disappear properly in time trial
var tile = tile_layer_find(-122,x,y);
if (tile != -1){
tile_delete(tile);
}
</string>
</argument>
</arguments>

@ -0,0 +1,143 @@
<!--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>-2</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>/* be sure to set these variables manually in a with or something or else
this won't work.. and we sure don't need more spaghetti like THAT
button_width = 40; divides this number by 2 in draw
button_height = 10; also divides this by 2 in draw
button_x = 0; uses this to link to oEditorTab properly (0 = middle)
button_y = 0; uses this to link to oEditorTab properly (0 = top)
button_flag = -1; determines what oEditorTab will recieve and likewise send to oTrialEditor
button_string = "String"; says a funny
button_sprite = -1; shows a funny (only if button_string isn't filled)
button_border = c_white; button border color. amazing
below are included vars. don't bother setting them yourself*/
button_alpha = 1; // rises in value initially for a nice little fade in effect
button_highlight = 0;
</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>// highlight code
if (mouse_x &gt; x-(button_width/2) &amp;&amp; mouse_x &lt; x+(button_width/2) &amp;&amp; mouse_y &gt; y-(button_height/2) &amp;&amp; mouse_y &lt; y+(button_height/2) &amp;&amp; oTrialEditor.cursor_active == 0){ // ew....
button_highlight = 1;
if (mouse_check_button_pressed(mb_left)){
oTrialEditor.relay_button = button_flag;
sfx_play(sndMenuSel);
}
}else{
button_highlight = 0;
}
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="8" enumb="73">
<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>// move x/y
x = oEditorTab.x+button_x;
y = oEditorTab.y+button_y;
// everything is drawn from the center
var round_x = round(x);
var round_y = round(y);
draw_set_color(button_border);
// the contents
// the box
draw_set_alpha(1);
draw_rectangle(round_x-(button_width/2),round_y-(button_height/2),round_x+(button_width/2),round_y+(button_height/2),true);
// the contents
if (button_string == ""){ // sprite
var sw = sprite_get_width(button_sprite);
var sh = sprite_get_height(button_sprite);
draw_sprite_part(button_sprite,0,0,0,sw,sh,(0-(sw/2))+round_x,(0-(sh/2))+round_y); // this is a really dumb way of forcing the sprite to the middle
}else{ // string
draw_set_font(fontMenuTinyDefault);
draw_set_color(c_white);
draw_set_halign(fa_center);
draw_set_valign(fa_center);
draw_text(round_x+1,round_y-1,button_string);
}
// box hlight
if (button_highlight){
draw_set_alpha(0.3);
draw_set_color(button_border);
draw_rectangle(round_x-(button_width/2),round_y-(button_height/2),round_x+(button_width/2),round_y+(button_height/2),false);
}
</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>

@ -89,6 +89,11 @@ if (!keyboard_check(ord("W")) &amp;&amp; !keyboard_check(ord("S"))){
}
}
if ((instance_exists(oEditorInfo))){
velocity_x = 0;
velocity_y = 0;
}
// clamps
velocity_x = clamp(velocity_x,-3,3);
velocity_y = clamp(velocity_y,-3,3);
@ -100,6 +105,8 @@ y += velocity_y;
// .. and cap it at the edges!
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;
</string>
</argument>
</arguments>

@ -0,0 +1,23 @@
<!--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/>
<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>

@ -0,0 +1,91 @@
<!--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="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>oTrialEditor.lockout = 1;
if mouse_check_button_released(mb_left) then instance_destroy();
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="8" enumb="73">
<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>var cx = view_xview[0];
var cy = view_yview[0];
x = cx;
y = cy;
draw_set_color(c_black);
draw_set_alpha(0.5);
draw_rectangle((-60)+x,(-10)+y,426+x,250+y,false);
draw_set_alpha(1);
draw_set_font(fontGUI2Default);
draw_set_color(c_white);
draw_set_halign(fa_center);
draw_text_border(160+x,40+y,"Controls");
draw_text_border(160+x,90+y,"WASD - Move Camera");
draw_text_border(160+x,100+y,"Left Mouse - Place Object");
draw_text_border(160+x,110+y,"Right Mouse - Delete Object");
draw_text_border(160+x,140+y,"Highlight your mouse over the tab to");
draw_text_border(160+x,150+y,"select different objects. Have fun!");
draw_text_border(160+x,200+y,"Press Left Mouse to close");
</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>

@ -0,0 +1,199 @@
<!--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>-98</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>mode = 0;
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(160,140,70,10,2,"Confirm",2,c_lime);
relay_button = -1;
type_mode = -1;
</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 (oInfoButton){ // you're coming with me!
instance_destroy();
}
// also set a mb lockout on the main obj so that you don't click randomly
oTrialEditor.lockout = 1;
</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>//keyboard_string = string_lettersdigits(keyboard_string);
// i'll figure this out later
if (type_mode != -1){
if (type_mode == 0){ // name
oTrialEditor.stage_name = keyboard_string;
}else{ // author
oTrialEditor.stage_auth = keyboard_string;
}
if (keyboard_check_pressed(vk_enter)){
if string_lettersdigits(keyboard_string) = ""{
sfx_play(sndMenuCancel);
}else{
bu[0] = c_white;
bu[1] = c_white;
type_mode = -1;
sfx_play(sndMenuSel);
}
}
}
// info relays
if (relay_button &gt; -1){
switch (relay_button){
case 0: // start typing out name
type_mode = 0;
bu[0] = c_yellow;
keyboard_string = oTrialEditor.stage_name;
break;
case 1: // start typing out author
type_mode = 1;
bu[1] = c_yellow;
keyboard_string = oTrialEditor.stage_auth;
break;
case 2: // perish
instance_destroy();
break;
}
relay_button = -1;
}
// this is a really strange way of making button go
with (oInfoButton){
if (button_flag == 0){
button_string = oTrialEditor.stage_name;
button_border = other.bu[0];
if (other.type_mode == 0) then button_string = oTrialEditor.stage_name+"|";
}
if (button_flag == 1){
button_string = oTrialEditor.stage_auth;
button_border = other.bu[1];
if (other.type_mode == 1) then button_string = oTrialEditor.stage_auth+"|";
}
}
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="8" enumb="73">
<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>var cx = view_xview[0];
var cy = view_yview[0];
x = cx;
y = cy;
draw_set_color(c_black);
draw_set_alpha(0.5);
draw_rectangle((-60)+x,(-10)+y,426+x,250+y,false);
draw_set_alpha(1);
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");
</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>

@ -7,7 +7,106 @@
<persistent>0</persistent>
<parentName>&lt;undefined&gt;</parentName>
<maskName>&lt;undefined&gt;</maskName>
<events/>
<events>
<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>// i'm so sorry for your frames
switch (solid_style){
default:
draw_self();
break;
case 1:
draw_sprite(sSlope1,0,x,y);
break;
case 2:
draw_sprite(sSlope2,0,x,y);
break;
case 3:
draw_sprite(sBlockStep,0,x,y);
break;
case 4:
draw_sprite(sBlockShoot,0,x,y);
break;
case 5:
draw_sprite(sBlockBomb,0,x,y);
break;
case 6:
draw_sprite(sBlockMissile,0,x,y);
break;
case 7:
draw_sprite(sBlockSMissile,0,x,y);
break;
case 8:
draw_sprite(sBlockPBomb,0,x,y);
break;
case 9:
draw_sprite(sBlockScrew,0,x,y);
break;
case 10:
draw_sprite(sBlockSpeed,0,x,y);
break;
case 11:
draw_sprite(sEditorStart,0,x+8,y+16);
break;
case 12:
draw_sprite(sEDTrigger,0,x,y);
break;
case 13:
draw_sprite(sEDSpike,0,x,y);
break;
// items
case 14:
draw_sprite(sItemSpiderBall,0,x+0,y+16);
break;
case 15:
draw_sprite(sItemJumpBall,0,x+0,y+16);
break;
case 16:
draw_sprite(sItemHijump,0,x+0,y+16);
break;
case 17:
draw_sprite(sItemSpaceJump,0,x+0,y+16);
break;
case 18:
draw_sprite(sItemBomb,0,x+0,y+16);
break;
case 19:
draw_sprite(sItemMissile,0,x+0,y+16);
break;
case 20:
draw_sprite(sItemSuperMissile,0,x+0,y+16);
break;
case 21:
draw_sprite(sItemPowerBomb,0,x+0,y+16);
break;
case 22:
draw_sprite(sItemScrewAttack,0,x+0,y+16);
break;
case 23:
draw_sprite(sItemSpeedBooster,0,x+0,y+16);
break;
}
</string>
</argument>
</arguments>
</action>
</event>
</events>
<PhysicsObject>0</PhysicsObject>
<PhysicsObjectSensor>0</PhysicsObjectSensor>
<PhysicsObjectShape>0</PhysicsObjectShape>

@ -3,7 +3,7 @@
<spriteName>sEditorTab</spriteName>
<solid>0</solid>
<visible>-1</visible>
<depth>0</depth>
<depth>-1</depth>
<persistent>0</persistent>
<parentName>&lt;undefined&gt;</parentName>
<maskName>&lt;undefined&gt;</maskName>
@ -31,6 +31,39 @@ smoothset = 0;
message_string = "Welcome to the AM2Rials editor!";
if (oControl.widescreen == 0) message_string = "It appears you are using 4:3. Switch to 16:9 for a better experience!";
message_tick = 300;
// data buttons
create_button(3-185,22,50,12,0,"Info",0,c_fuchsia);
create_button(3-185,36,50,12,1,"Save",0,c_lime);
create_button(3-185,50,50,12,2,"Load",0,c_aqua);
create_button(3-185,64,50,12,3,"Exit",0,c_red);
// obj buttons
create_button(3-140,29,24,24,4,"",sEditorStartIcon,c_white);
create_button(3-110,29,24,24,5,"",sSolid,c_white);
create_button(3-80,29,24,24,6,"",sSlope1,c_white);
create_button(3-50,29,24,24,7,"",sSlope2,c_white);
create_button(3-20,29,24,24,8,"",sBlockStep,c_white);
create_button(3+10,29,24,24,9,"",sBlockShoot,c_white);
create_button(3+40,29,24,24,10,"",sBlockBomb,c_white);
create_button(3+70,29,24,24,11,"",sBlockMissile,c_white);
create_button(3+100,29,24,24,12,"",sBlockSMissile,c_white);
create_button(3+130,29,24,24,13,"",sBlockPBomb,c_white);
create_button(3+160,29,24,24,14,"",sBlockScrew,c_white);
create_button(3+190,29,24,24,15,"",sBlockSpeed,c_white);
// row 2
create_button(3-140,57,24,24,16,"",sEDTrigger,c_white); // end tiles
create_button(3-110,57,24,24,17,"",sEDSpike,c_white); // spike tiles
create_button(3-80,57,24,24,18,"",sItemSpiderBall,c_white);
create_button(3-50,57,24,24,19,"",sItemJumpBall,c_white);
create_button(3-20,57,24,24,20,"",sItemHijump,c_white);
create_button(3+10,57,24,24,21,"",sItemSpaceJump,c_white);
create_button(3+40,57,24,24,22,"",sItemBomb,c_white);
create_button(3+70,57,24,24,23,"",sItemMissile,c_white);
create_button(3+100,57,24,24,24,"",sItemSuperMissile,c_white);
create_button(3+130,57,24,24,25,"",sItemPowerBomb,c_white);
create_button(3+160,57,24,24,26,"",sItemScrewAttack,c_white);
create_button(3+190,57,24,24,27,"",sItemSpeedBooster,c_white);
</string>
</argument>
</arguments>
@ -78,11 +111,12 @@ message_tick = 300;
<kind>1</kind>
<string>draw_self(); // lol
// info on the current stage
draw_set_valign(fa_top);
draw_set_alpha(1);
draw_set_color(c_white);
draw_set_font(fontMenuSmall2Default);
draw_set_halign(fa_right);
draw_text_border(x-45,y-1,"Untitled Stage"); // stage name
draw_text_border(x-45,y-1,oTrialEditor.stage_name); // stage name
draw_text_border(x+(158+(oControl.widescreen*45)),y-1,"X: "+string(mouse_x)+" / Y: "+string(mouse_y)); // mouse x/y
draw_set_halign(fa_left);
draw_text_border(x+45,y-1,"OBJs: "+string(oTrialEditor.placed_objs)); // objects placed
@ -90,6 +124,7 @@ draw_set_font(fontMenuTinyDefault);
draw_set_halign(fa_center);
draw_set_alpha(message_tick/50);
draw_text_border(x,y-16,message_string); // notification text
draw_set_alpha(1);
</string>
</argument>
</arguments>

@ -0,0 +1,144 @@
<!--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>-99</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>// yes this is a copy of oEditrButton no i didn't use a parent why are you asking?
/* be sure to set these variables manually in a with or something or else
this won't work.. and we sure don't need more spaghetti like THAT
button_width = 40; divides this number by 2 in draw
button_height = 10; also divides this by 2 in draw
button_x = 0; uses this to link to oEditorTab properly (0 = middle)
button_y = 0; uses this to link to oEditorTab properly (0 = top)
button_flag = -1; determines what oEditorTab will recieve and likewise send to oTrialEditor
button_string = "String"; says a funny
button_sprite = -1; shows a funny (only if button_string isn't filled)
button_border = c_white; button border color. amazing
below are included vars. don't bother setting them yourself*/
button_alpha = 1; // rises in value initially for a nice little fade in effect
button_highlight = 0;
</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>// highlight code
if (mouse_x &gt; x-(button_width/2) &amp;&amp; mouse_x &lt; x+(button_width/2) &amp;&amp; mouse_y &gt; y-(button_height/2) &amp;&amp; mouse_y &lt; y+(button_height/2) &amp;&amp; oEditorInfo.type_mode == -1){ // still ew, but... no, no "buts." this is ew.
button_highlight = 1;
if (mouse_check_button_pressed(mb_left)){
oEditorInfo.relay_button = button_flag;
sfx_play(sndMenuSel);
}
}else{
button_highlight = 0;
}
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="8" enumb="73">
<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>// move x/y
x = oEditorInfo.x+button_x;
y = oEditorInfo.y+button_y;
// everything is drawn from the center
var round_x = round(x);
var round_y = round(y);
draw_set_color(button_border);
// the contents
// the box
draw_set_alpha(1);
draw_rectangle(round_x-(button_width/2),round_y-(button_height/2),round_x+(button_width/2),round_y+(button_height/2),true);
// the contents
if (button_string == ""){ // sprite
var sw = sprite_get_width(button_sprite);
var sh = sprite_get_height(button_sprite);
draw_sprite_part(button_sprite,0,0,0,sw,sh,(0-(sw/2))+round_x,(0-(sh/2))+round_y); // this is a really dumb way of forcing the sprite to the middle
}else{ // string
draw_set_font(fontMenuTinyDefault);
draw_set_color(c_white);
draw_set_halign(fa_center);
draw_set_valign(fa_center);
draw_text(round_x+1,round_y-1,button_string);
}
// box hlight
if (button_highlight){
draw_set_alpha(0.3);
draw_set_color(button_border);
draw_rectangle(round_x-(button_width/2),round_y-(button_height/2),round_x+(button_width/2),round_y+(button_height/2),false);
}
</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>

@ -26,6 +26,8 @@
<argument>
<kind>1</kind>
<string>image_speed = 0.2;
global.powergrip = 0;
</string>
</argument>
</arguments>

@ -0,0 +1,74 @@
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
<spriteName>sItemScrewAttack</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>image_speed = 0.2;
</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>audio_stop_sound(sndMessage);
sfx_play(sndMessage);
make_notification("New Item","Screw Attack Acquired",140,"","");
global.screwattack = 1;
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>

@ -51,8 +51,8 @@
<string>audio_stop_sound(sndMessage);
sfx_play(sndMessage);
make_notification("New Item","Super Missile Tank Acquired",140,"","");
global.smissiles += 5;
global.maxsmissiles += 5;
global.smissiles += 2;
global.maxsmissiles += 2;
instance_destroy();
</string>
</argument>

@ -27,6 +27,7 @@
<kind>1</kind>
<string>oControl.ingame = 0;
sfx_stop_all();
sfx_play(sndMessage);
mus_change(musTrialsWin);
</string>
</argument>
@ -77,7 +78,10 @@ room_change(trialselectroom,0);
<arguments>
<argument>
<kind>1</kind>
<string>// set up
<string>draw_set_alpha(1);
draw_sprite(global.frame,0,-(oControl.widescreen*53),0); // test
// set up
draw_set_color(c_white);
draw_set_font(fontGUI2Default);
draw_set_halign(fa_center);

@ -28,11 +28,46 @@
<string>global.trialsurface = 0; /* i don't know how to work surfaces so i gave up
enjoy this global var :cry: */
instance_create(160,120,oEditorCamera);
instance_create(0,0,oEditorHelp);
cursor_active = 1;
placed_objs = 0;
trial_tab_bottom = instance_create(160,225,oEditorTab);
solid_place = 0;
// 0 - normal solid
// 1 - right slope
// 2 - left slope
// 3 - slipthrough solid
// 4 - breakable solid (beam)
// 5 - breakable solid (bomb)
// 6 - breakable solid (missile)
// 7 - breakable solid (soup)
// 8 - breakable solid (powbomb)
// 9 - breakable solid (screw)
// 10 - breakable solid (speed)
// 11 - samus spawn
// 12 - exit solid
// 13 - spikes
// 14 - spiderball
// 15 - jumpball
// 16 - hijump
// 17 - spacejump
// 18 - bomb
// 19 - 5 missiles
// 20 - 2 soups
// 21 - 2 powas
// 22 - screwattack
// 23 - speedbooster
relay_button = -1;
stage_name = "Untitled Level";
stage_auth = "Anonymous";
stage_id = generate_id();
lockout = 0; // mouse garbage idk
</string>
</argument>
</arguments>
@ -58,16 +93,26 @@ trial_tab_bottom = instance_create(160,225,oEditorTab);
<string>// this is some temporary code to test clicking on specific areas
if (cursor_active){
if (mouse_check_button(mb_left)){
if (!lockout){ // can't place if lockout exists
var xx = floor(mouse_x/16)*16;
var yy = floor(mouse_y/16)*16;
with (oEditorSolid){ // a check to deny further placement of solids on top of each other
if (x == xx &amp;&amp; y == yy){
var no_multi = 0;
if (solid_place == 11 || solid_place == 14 || solid_place == 15 || solid_place == 16 || solid_place == 17 || solid_place == 18 || solid_place == 22 || solid_place == 23){
no_multi = 1;
}
with (oEditorSolid){ // a check to deny further placement of solids on top of each other OR if attempting to place multiple spawns
if ((x == xx &amp;&amp; y == yy) || (no_multi &amp;&amp; solid_style == other.solid_place)){
instance_destroy(); // if check confirms, turn the old one into dust
// this probably isn't efficient but i do not care
}
}
instance_create(xx,yy,oEditorSolid);
with (instance_create(xx,yy,oEditorSolid)){
solid_style = other.solid_place;
}
placed_objs = get_obj_count();
}
}else{
lockout = 0;
}
if (mouse_check_button(mb_right)){
@ -81,8 +126,8 @@ if (mouse_check_button(mb_right)){
}
with (trial_tab_bottom){
if (position_meeting(mouse_x,mouse_y,self)){
offset = 30;
if (position_meeting(mouse_x,mouse_y,self) &amp;&amp; (!instance_exists(oEditorInfo)) &amp;&amp; (!instance_exists(oEditorHelp))){
offset = 58;
other.cursor_active = 0;
}else{
offset = 0;
@ -90,6 +135,177 @@ with (trial_tab_bottom){
}
smoothset += (offset-smoothset)/5;
}
if (instance_exists(oEditorInfo)) then cursor_active = -1;
if (relay_button &gt; -1){
switch (relay_button){
case 0:
instance_create(0+view_xview[0],0+view_yview[0],oEditorInfo);
break;
case 1:
// save level (there's a script for that)
editor_save();
break;
case 2:
// load level (there's a script for that)
editor_load();
break;
case 3:
// go away
room_change(trialselectroom,0);
break;
case 4:
// player spawn
editor_message("Selected Player Spawn");
solid_place = 11;
break;
case 5:
// normal solid
editor_message("Selected Solid");
solid_place = 0;
break;
case 6:
// normal going upright
editor_message("Selected Right Slope");
solid_place = 1;
break;
case 7:
// slope going upleft
editor_message("Selected Left Slope");
solid_place = 2;
break;
case 8:
// crumble solid
editor_message("Selected Crumble Solid");
solid_place = 3;
break;
case 9:
// beam block
editor_message("Selected Breakable Block");
solid_place = 4;
break;
case 10:
// bomb block
editor_message("Selected Bomb Block");
solid_place = 5;
break;
case 11:
// mibble block
editor_message("Selected Missile Block");
solid_place = 6;
break;
case 12:
// soup block
editor_message("Selected Super Missile Block");
solid_place = 7;
break;
case 13:
// powa block
editor_message("Selected Power Bomb Block");
solid_place = 8;
break;
case 14:
// screw block
editor_message("Selected Screw Attack Block");
solid_place = 9;
break;
case 15:
// speed block
editor_message("Selected Speed Booster Block");
solid_place = 10;
break;
case 16:
// exit area
editor_message("Selected Exit Zone");
solid_place = 12;
break;
case 17:
// spikes/hazards
editor_message("Selected Hazard");
solid_place = 13;
break;
case 18:
// spiderball
editor_message("Selected Spider Ball");
solid_place = 14;
break;
case 19:
// jumpball
editor_message("Selected Spring Ball");
solid_place = 15;
break;
case 20:
// hijump
editor_message("Selected Hi-jump");
solid_place = 16;
break;
case 21:
// spacejump
editor_message("Selected Space Jump");
solid_place = 17;
break;
case 22:
// bomb
editor_message("Selected Bombs");
solid_place = 18;
break;
case 23:
// mibble
editor_message("Selected five Missiles");
solid_place = 19;
break;
case 24:
// soup mibble
editor_message("Selected two Super Missiles");
solid_place = 20;
break;
case 25:
// powa bomb
editor_message("Selected two Power Bombs");
solid_place = 21;
break;
case 26:
// screwattack
editor_message("Selected Screw Attack");
solid_place = 22;
break;
case 27:
// speedbooster
editor_message("Selected Speed Booster");
solid_place = 23;
break;
default:
// not much to say so fun fact! smart tab is terrible
editor_message("Relayed message "+string(relay_button)+".");
break;
}
relay_button = -1;
}
</string>
</argument>
</arguments>
</action>
</event>
<event eventtype="8" enumb="73">
<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>// the cursor
draw_set_alpha(1);
draw_sprite(sEditorCursor,0,mouse_x,mouse_y);
</string>
</argument>
</arguments>
@ -157,12 +373,21 @@ if (cursor_active){
var snap = 16;
var xx = floor(mouse_x/snap)*snap;
var yy = floor(mouse_y/snap)*snap;
draw_sprite_ext(sSolid,0,xx,yy,1,1,0,c_white,0.3);
switch (solid_place){
default:
draw_sprite_ext(sSolid,0,xx+0,yy+0,1,1,0,c_white,0.3);
break;
case 1:
draw_sprite_ext(sSlope1,0,xx+0,yy+0,1,1,0,c_white,0.3);
break;
case 2:
draw_sprite_ext(sSlope2,0,xx+0,yy+0,1,1,0,c_white,0.3);
break;
case 11:
draw_sprite_ext(sEditorStart,0,xx+8,yy+16,1,1,0,c_black,0.3);
break;
}
}
// the cursor too
draw_set_alpha(1);
draw_sprite(sEditorCursor,0,mouse_x,mouse_y);
</string>
</argument>
</arguments>

@ -1,6 +1,6 @@
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
<spriteName>sEDSpike</spriteName>
<spriteName>sGoal</spriteName>
<solid>0</solid>
<visible>-1</visible>
<depth>0</depth>
@ -25,7 +25,8 @@
<arguments>
<argument>
<kind>1</kind>
<string>visible = 0;
<string>image_alpha = 0.3;
image_speed = 0.25;
</string>
</argument>
</arguments>
@ -48,11 +49,13 @@
<arguments>
<argument>
<kind>1</kind>
<string>sfx_play(sndMessage);
mus_stop(oMusicV2.currentbgm);
<string>mus_stop(oMusicV2.currentbgm);
oTrialLogic.timer_started = -1;
global.end_time = oTrialLogic.timer;
instance_destroy(); // done with this object so make it not exist
with (oTrialGoal){
instance_destroy(); // delete this object and all other potential trialgoals that could ruin my day
}
goal_trial();
</string>
</argument>
</arguments>

@ -32,6 +32,137 @@ alarm[0] = 1; // alarm for spawning samus
// variables
timer_started = 0;
timer = 0; // in tics
// GENERATING THE LEVEL
// grid for making visuals later
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){
file_text_readln(file);
}
// objs
while (!file_text_eof(file)){
var xx = file_text_read_real(file);
file_text_readln(file);
var yy = file_text_read_real(file);
file_text_readln(file);
var ty = file_text_read_real(file);
file_text_readln(file);
switch (ty){
case 0: // normal solid
instance_create(xx,yy,oSolid1);
ds_grid_set(grid,floor(xx/16),floor(yy/16),1);
break;
case 1: // slope 1
instance_create(xx,yy,oSlope1);
ds_grid_set(grid,floor(xx/16),floor(yy/16),2);
break;
case 2: // slope 2
instance_create(xx,yy,oSlope2);
ds_grid_set(grid,floor(xx/16),floor(yy/16),3);
break;
case 3: // crack block
instance_create(xx,yy,oBlockStep);
ds_grid_set(grid,floor(xx/16),floor(yy/16),4);
break;
case 4: // beamblock
instance_create(xx,yy,oBlockShoot);
ds_grid_set(grid,floor(xx/16),floor(yy/16),4);
break;
case 5: // bombblock
instance_create(xx,yy,oBlockBomb);
ds_grid_set(grid,floor(xx/16),floor(yy/16),4);
break;
case 6: // missileblock
instance_create(xx,yy,oBlockMissile);
ds_grid_set(grid,floor(xx/16),floor(yy/16),4);
break;
case 7: // superblock
instance_create(xx,yy,oBlockSMissile);
ds_grid_set(grid,floor(xx/16),floor(yy/16),4);
break;
case 8: // pbombblock
instance_create(xx,yy,oBlockPBomb);
ds_grid_set(grid,floor(xx/16),floor(yy/16),4);
break;
case 9: // screwblock
instance_create(xx,yy,oBlockScrew);
ds_grid_set(grid,floor(xx/16),floor(yy/16),4);
break;
case 10: // speedblock
instance_create(xx,yy,oBlockSpeed);
ds_grid_set(grid,floor(xx/16),floor(yy/16),4);
break;
case 11: // spawn. also for filling grid
x = xx+8;
y = yy+16;
var s_x = x;
var s_y = y-8;
break;
case 12: // FREEDOM
instance_create(xx,yy,oTrialGoal);
break;
case 13: // spikes
instance_create(xx,yy,oSpikes2);
break;
// items
case 14: // spiderball
//instance_create(xx,yy+16,oTTSpider);
break;
case 15: // jumpball
instance_create(xx,yy+16,oTTSpring);
break;
case 16: // hijump
instance_create(xx,yy+16,oTTHijump);
break;
case 17: // spacejump
//instance_create(xx,yy+16,oSpikes2);
break;
case 18: // bombs
instance_create(xx,yy+16,oTTBomb);
break;
case 19: // missile
instance_create(xx,yy+16,oTTMissile);
break;
case 20: // super
instance_create(xx,yy+16,oTTSuper);
break;
case 21: // power
//instance_create(xx,yy+16,oSpikes2);
break;
case 22: // screw
instance_create(xx,yy+16,oTTScrew);
break;
case 23: // speed
instance_create(xx,yy+16,oTTBooster);
break;
}
}
// now make visuals off of the grid
for (var i = 0; i &lt; 200; ++i;){
for (var v = 0; v &lt; 150; ++v;){
switch (ds_grid_get(grid,i,v)){
case 1:
tile_add(tlArea1A,0,0,16,16,i*16,v*16,-100);
break;
case 2:
tile_add(tlArea1A,0,224,16,16,i*16,v*16,-100);
break;
case 3:
tile_add(tlArea1A,16,224,16,16,i*16,v*16,-100);
break;
case 4:
tile_add(tlArea1A,112,352,16,16,i*16,v*16,-122);
break;
}
}
}
// kill the grid because memory leaks are bad
ds_grid_destroy(grid);
</string>
</argument>
</arguments>

@ -29,6 +29,7 @@
it's probably not an optimal way of having a menu
i'll live my life how i want to */
draw_set_valign(fa_top);
audio_stop_sound(musTitle); // a fix so that the og main menu theme stops playing
scroll_x = 0; // background scrolling
@ -44,6 +45,24 @@ active = 1; // whether the menus are active
cat = 0; // category
sel = 0; // (cursor) selection
// custom levels
custom_levels = 0;
// set up folders if they're not there
if (!directory_exists("stages/")){
directory_create("stages/");
}else{ // otherwise, dig in
var file = file_find_first("stages/*.am2rials",0);
if (file != ""){ // stages do exist!
get_stage_data(file);
var file = file_find_next();
while (file != ""){
get_stage_data(file);
var file = file_find_next();
}
}
}
// genuinely don't worry about any of this..
// course select variables
map_scroll = 0; // the course select scroll
real_scroll = 0; // the "real" scroll variable
@ -186,8 +205,11 @@ if (oControl.kMenu1Pressed){
sfx_play(sndMenuSel);
switch (sel){
case 0:
/*
cat = 1;
map_scroll = real_scroll;
*/
cat = 2;
break;
case 1:
room_change(trialeditor,0);
@ -224,6 +246,28 @@ if (oControl.kMenu2Pressed){
sel = 0;
}
break;
case 2:
if (oControl.kDown &amp;&amp; oControl.kDownPushedSteps == 0){
sfx_play(sndMenuMove);
++sel;
}
if (oControl.kUp &amp;&amp; oControl.kUpPushedSteps == 0){
sfx_play(sndMenuMove);
--sel;
}
if (sel &gt; custom_levels-1) then sel = 0;
if (sel &lt; 0) then sel = custom_levels-1;
if (oControl.kMenu1Pressed){
sfx_play(sndMenuSel);
global.level_is = custom_level_file[sel];
start_trial();
}
if (oControl.kMenu2Pressed){
sfx_play(sndMenuCancel);
cat = 0;
sel = 0;
}
break;
}
}
// flavor_textinator
@ -235,7 +279,7 @@ case 0:
flavor_text = "Select a course and attempt to set a best time.";
break;
case 1:
flavor_text = "Play a tutorial on a specific ability.";
flavor_text = "Create your own levels with the level editor.";
break;
case 2:
flavor_text = "Access AM2R's settings to tweak gameplay options.";
@ -337,7 +381,7 @@ cursor_blinking(sel,3);
draw_sprite_ext(sTTButton43,3,cx+75,cy+72,1,1,0,draw_get_color(),1);
}
break;
case 1: // course select
case 1: // course select (defunct)
for (var r1 = 0; r1 &lt; available_maps; ++r1){
draw_set_font(fontGUI2Default);
cursor_blinking(sel,r1);
@ -354,16 +398,32 @@ draw_text_border(300,200,"Best Time: "+time_string(map_info[3,sel]));
draw_set_color(c_yellow);
draw_text_border(300,210,"Dev Time: "+time_string(map_info[4,sel]));
break;
case 2: // new course select
draw_set_halign(fa_center);
draw_set_color(c_white);
draw_text_border(160,30,string(custom_levels)+" levels found");
if (custom_levels){
for (var i = 0; i &lt; custom_levels; ++i;){
if (sel == i){
draw_text_border(160,60+(i*10),"&gt; "+custom_level_name[i]+" by "+custom_level_auth[i]+" &lt;");
}else{
draw_text_border(160,60+(i*10),custom_level_name[i]+" by "+custom_level_auth[i]);
}
}
}else{
draw_text_border(160,60+(i*10),"Levels can be");
}
break;
}
// lower bar
if (!flavor_text == ""){
draw_set_color(c_black);
draw_rectangle(-100,230,420,240,false);
draw_set_color(c_white);
draw_set_halign(fa_center);
draw_set_font(fontMenuSmallDefault);
draw_text(160,228,flavor_text);
draw_set_color(c_black);
draw_rectangle(-100,230,420,240,false);
draw_set_color(c_white);
draw_set_halign(fa_center);
draw_set_font(fontMenuSmallDefault);
draw_text(160,228,flavor_text);
}
</string>
</argument>

@ -1,8 +1,8 @@
<!--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>
<width>3200</width>
<height>2400</height>
<vsnap>16</vsnap>
<hsnap>16</hsnap>
<isometric>0</isometric>
@ -52,7 +52,7 @@ oMusicV2.currentbgm = musCaveAmbience;</code>
<view visible="0" objName="&lt;undefined&gt;" 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="oTrialLogic" x="160" y="144" name="inst_3D06EA82" locked="0" code="" scaleX="1" scaleY="1" colour="4294967295" rotation="0"/>
<instance objName="oTrialLogic" x="0" y="0" name="inst_3D06EA82" locked="0" code="" scaleX="1" scaleY="1" colour="4294967295" rotation="0"/>
</instances>
<tiles/>
<PhysicsWorld>0</PhysicsWorld>

@ -10,7 +10,13 @@
<persistent>0</persistent>
<colour>0</colour>
<showcolour>-1</showcolour>
<code>global.skip_mMenu = 0;</code>
<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>
<enableViews>-1</enableViews>
<clearViewBackground>-1</clearViewBackground>
<clearDisplayBuffer>0</clearDisplayBuffer>

@ -0,0 +1,11 @@
// create_button(xx,yy,width,height,flag,string,sprite,border);
with (instance_create(-200,-200,oEditorButton)){
button_width = argument2;
button_height = argument3;
button_x = argument0;
button_y = argument1;
button_flag = argument4;
button_string = argument5;
button_sprite = argument6;
button_border = argument7;
}

@ -0,0 +1,11 @@
// create_button_alt(xx,yy,width,height,flag,string,sprite,border);
with (instance_create(-200,-200,oInfoButton)){
button_width = argument2;
button_height = argument3;
button_x = argument0;
button_y = argument1;
button_flag = argument4;
button_string = argument5;
button_sprite = argument6;
button_border = argument7;
}

@ -195,7 +195,7 @@ if (global.etanks > 10)
}
}
draw_set_font(global.guifont2);
if (global.maxmissiles > 0) {
if (global.missiles > 0) {
if (global.maxmissiles >= 100) {
draw_background(bgGUIMsl, xoff, 0);
} else draw_background(bgGUISmsl, xoff, 0);
@ -216,7 +216,7 @@ if (global.maxmissiles >= 100) {
xoff += 45;
} else xoff += 38;
}
if (global.maxsmissiles > 0) {
if (global.smissiles > 0) {
draw_background(bgGUISmsl, xoff, 0);
draw_text(xoff + 19, 7, string(global.smissiles));
if (global.opmslstyle == 0) {
@ -233,7 +233,7 @@ draw_sprite(sGUISMissile, 1, xoff + 1, 4);
}
xoff += 38;
}
if (global.maxpbombs > 0) {
if (global.pbombs > 0) {
draw_background(bgGUISmsl, xoff, 0);
draw_text(xoff + 19, 7, string(global.pbombs));
if (global.opmslstyle == 0) {

@ -0,0 +1,34 @@
editor_message("Loading...");
var load = get_open_filename_ext("Level (.am2rials)|*.am2rials","",working_directory+"stages/","Select Stage");
if (load != ""){
// perish obj
with (oEditorSolid){
instance_destroy();
}
// strings
var file = file_text_open_read(load);
stage_name = file_text_read_string(file);
file_text_readln(file);
stage_auth = file_text_read_string(file);
file_text_readln(file);
stage_id = file_text_read_string(file);
file_text_readln(file);
file_text_readln(file);
// objs
while (!file_text_eof(file)){
var xx = file_text_read_real(file);
file_text_readln(file);
var yy = file_text_read_real(file);
file_text_readln(file);
var ty = file_text_read_real(file);
file_text_readln(file);
with (instance_create(xx,yy,oEditorSolid)){
solid_style = ty;
}
}
file_text_close(file);
editor_message("Load complete.");
placed_objs = get_obj_count();
}

@ -0,0 +1,2 @@
oEditorTab.message_string = argument0;
oEditorTab.message_tick = 300;

@ -0,0 +1,42 @@
editor_message("Saving...");
// abort if the level uses no objects
if (placed_objs == 0){
editor_message("This level requires at least one object before it can be saved!");
exit;
}
// abort if the level has no player start
var start_exists = 0;
with (oEditorSolid){
if (solid_style == 11) then start_exists = 1;
}
if (start_exists == 0){
editor_message("This level requires at least one player start before it can be saved!");
exit;
}
// otherwise... let's crack into this egg
var file = file_text_open_write("stages/"+stage_id+".am2rials");
// name, author and id data
file_text_write_string(file,stage_name);
file_text_writeln(file);
file_text_write_string(file,stage_auth);
file_text_writeln(file);
file_text_write_string(file,stage_id);
file_text_writeln(file);
file_text_writeln(file);
// save all the objects. ALL. OF. THEM. and then pray it doesn't break
with (oEditorSolid){
file_text_write_string(file,string(x));
file_text_writeln(file);
file_text_write_string(file,string(y));
file_text_writeln(file);
file_text_write_string(file,string(solid_style));
file_text_writeln(file);
}
// end saving
file_text_close(file);
editor_message("Save completed.");
// can i keep going? okay..

@ -0,0 +1,8 @@
//generate_id();
var str = "";
for (var i = 0; i < 32; ++i;){
str = str+choose("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9");
}
show_debug_message("generate_id(): "+str);
return str;
// i do not want to talk about it. leave me alone

@ -0,0 +1,8 @@
//get_stage_data(file_name);
custom_level_file[custom_levels] = argument0;
var open = file_text_open_read("stages/"+argument0);
custom_level_name[custom_levels] = file_text_read_string(open);
file_text_readln(open);
custom_level_auth[custom_levels] = file_text_read_string(open);
file_text_close(open);
++custom_levels; // inc custom_levels

@ -1,4 +1,9 @@
// goal_trial()
remove_persistent_objects();
global.ingame = 0;
room_change(trialclearroom,0);
if (oControl.widescreen){
global.frame = sprite_create_from_surface(oControl.widescreen_surface,0,0,426,240,false,false,0,0);
}else{
global.frame = sprite_create_from_surface(application_surface,0,0,372,240,false,false,0,0);
}
room_goto(trialclearroom);

@ -1,8 +1,9 @@
var room_ = global.trial_is;
load_character_vars();
// set other vars outside of character_vars
global.missiles = 0;
global.maxmissiles = 0;
global.maxmissiles = 1;
global.maxsmissiles = 1;
global.maxpbombs = 1;
global.ingame = 1; // set global as "ingame"
oControl.mod_IGT = 0; // it won't leave me alone
// this is a mess of vars
@ -13,4 +14,4 @@ global.mapoffsetx = 5;
global.myposy = 5;
global.mapoffsety = 5;
// don't worry about it
room_change(room_,0); // go to the room designated by the var
room_change(empty_room,1); // go to the room designated by the var

@ -0,0 +1,29 @@
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<sound>
<kind>0</kind>
<extension>.wav</extension>
<origname>sound\audio\sItemPlace.wav</origname>
<effects>0</effects>
<volume>
<volume>1</volume>
</volume>
<pan>0</pan>
<bitRates>
<bitRate>192</bitRate>
</bitRates>
<sampleRates>
<sampleRate>44100</sampleRate>
</sampleRates>
<types>
<type>1</type>
</types>
<bitDepths>
<bitDepth>16</bitDepth>
</bitDepths>
<preload>-1</preload>
<data>sItemPlace.wav</data>
<compressed>0</compressed>
<streamed>0</streamed>
<uncompressOnLoad>0</uncompressOnLoad>
<audioGroup>0</audioGroup>
</sound>

@ -0,0 +1,29 @@
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<sound>
<kind>0</kind>
<extension>.wav</extension>
<origname>sound\audio\sItemSelect.wav</origname>
<effects>0</effects>
<volume>
<volume>1</volume>
</volume>
<pan>0</pan>
<bitRates>
<bitRate>192</bitRate>
</bitRates>
<sampleRates>
<sampleRate>44100</sampleRate>
</sampleRates>
<types>
<type>1</type>
</types>
<bitDepths>
<bitDepth>16</bitDepth>
</bitDepths>
<preload>-1</preload>
<data>sItemSelect.wav</data>
<compressed>0</compressed>
<streamed>0</streamed>
<uncompressOnLoad>0</uncompressOnLoad>
<audioGroup>0</audioGroup>
</sound>

@ -0,0 +1,25 @@
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<sprite>
<type>0</type>
<xorig>0</xorig>
<yorigin>0</yorigin>
<colkind>1</colkind>
<coltolerance>0</coltolerance>
<sepmasks>0</sepmasks>
<bboxmode>0</bboxmode>
<bbox_left>1</bbox_left>
<bbox_right>22</bbox_right>
<bbox_top>2</bbox_top>
<bbox_bottom>21</bbox_bottom>
<HTile>0</HTile>
<VTile>0</VTile>
<TextureGroups>
<TextureGroup0>0</TextureGroup0>
</TextureGroups>
<For3D>0</For3D>
<width>24</width>
<height>24</height>
<frames>
<frame index="0">images\sEditorStartIcon_0.png</frame>
</frames>
</sprite>

@ -3,14 +3,14 @@
<type>0</type>
<xorig>213</xorig>
<yorigin>0</yorigin>
<colkind>0</colkind>
<colkind>1</colkind>
<coltolerance>0</coltolerance>
<sepmasks>-1</sepmasks>
<sepmasks>0</sepmasks>
<bboxmode>0</bboxmode>
<bbox_left>0</bbox_left>
<bbox_right>425</bbox_right>
<bbox_top>0</bbox_top>
<bbox_bottom>59</bbox_bottom>
<bbox_bottom>119</bbox_bottom>
<HTile>0</HTile>
<VTile>0</VTile>
<TextureGroups>
@ -18,7 +18,7 @@
</TextureGroups>
<For3D>0</For3D>
<width>426</width>
<height>60</height>
<height>120</height>
<frames>
<frame index="0">images\sEditorTab_0.png</frame>
</frames>

@ -0,0 +1,28 @@
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<sprite>
<type>0</type>
<xorig>0</xorig>
<yorigin>0</yorigin>
<colkind>1</colkind>
<coltolerance>0</coltolerance>
<sepmasks>0</sepmasks>
<bboxmode>0</bboxmode>
<bbox_left>0</bbox_left>
<bbox_right>15</bbox_right>
<bbox_top>0</bbox_top>
<bbox_bottom>15</bbox_bottom>
<HTile>0</HTile>
<VTile>0</VTile>
<TextureGroups>
<TextureGroup0>0</TextureGroup0>
</TextureGroups>
<For3D>0</For3D>
<width>16</width>
<height>16</height>
<frames>
<frame index="0">images\sGoal_0.png</frame>
<frame index="1">images\sGoal_1.png</frame>
<frame index="2">images\sGoal_2.png</frame>
<frame index="3">images\sGoal_3.png</frame>
</frames>
</sprite>
Loading…
Cancel
Save