parent
0634c042f3
commit
61c264ee51
@ -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><undefined></spriteName>
|
||||
<solid>0</solid>
|
||||
<visible>-1</visible>
|
||||
<depth>-2</depth>
|
||||
<persistent>0</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>/* 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 > x-(button_width/2) && mouse_x < x+(button_width/2) && mouse_y > y-(button_height/2) && mouse_y < y+(button_height/2) && 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>
|
||||
@ -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><undefined></spriteName>
|
||||
<solid>0</solid>
|
||||
<visible>-1</visible>
|
||||
<depth>0</depth>
|
||||
<persistent>0</persistent>
|
||||
<parentName><undefined></parentName>
|
||||
<maskName><undefined></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><undefined></spriteName>
|
||||
<solid>0</solid>
|
||||
<visible>-1</visible>
|
||||
<depth>0</depth>
|
||||
<persistent>0</persistent>
|
||||
<parentName><undefined></parentName>
|
||||
<maskName><undefined></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><undefined></spriteName>
|
||||
<solid>0</solid>
|
||||
<visible>-1</visible>
|
||||
<depth>-98</depth>
|
||||
<persistent>0</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>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 > -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>
|
||||
@ -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><undefined></spriteName>
|
||||
<solid>0</solid>
|
||||
<visible>-1</visible>
|
||||
<depth>-99</depth>
|
||||
<persistent>0</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>// 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 > x-(button_width/2) && mouse_x < x+(button_width/2) && mouse_y > y-(button_height/2) && mouse_y < y+(button_height/2) && 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>
|
||||
@ -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><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>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>
|
||||
@ -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;
|
||||
}
|
||||
@ -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);
|
||||
|
||||
@ -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>
|
||||
@ -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…
Reference in new issue