Jump to content


Photo

Professional Menu Scripts!


  • Please log in to reply
188 replies to this topic

#61 Danny

Danny

    GMC Member

  • GMC Member
  • 1151 posts

Posted 25 September 2007 - 03:22 AM

Thats how cool you are, you need 1 screenshot to make hundreds download.
  • 0

#62 Midboss

Midboss

    GMC Member

  • New Member
  • 82 posts

Posted 26 September 2007 - 07:19 AM

Now THAT is one smooth, stylish menu. I'll probably use this at some point. Nice work.
  • 0

#63 YopYop

YopYop

    GMC Member

  • New Member
  • 120 posts

Posted 01 October 2007 - 10:04 PM

Nice :-)
And what about a get_string function ? ;-)
  • 0

#64 Alienpunisher10

Alienpunisher10

    Blue X Gaming

  • GMC Member
  • 636 posts

Posted 02 October 2007 - 12:54 PM

Can this be used in GM7 (Not Vista User) ?
  • 0

#65 The eleventh plague of Egypt

The eleventh plague of Egypt

    GMC Member

  • GMC Member
  • 1045 posts
  • Version:Unknown

Posted 04 October 2007 - 12:46 PM

Yes: GM7 can open .gm6 files, just double-click on them.
  • 0

#66 Mordi

Mordi

    Maker of Menus

  • New Member
  • 3635 posts

Posted 09 October 2007 - 09:51 PM

Realy Nice Menu, but  how do you make credits? i didnt see it in the tutorial

<{POST_SNAPBACK}>

I think you need to make the credits yourself. Not sure. :D Cant quite remember... :D
  • 0

#67 AJC Games

AJC Games

    GMC Member

  • New Member
  • 11 posts

Posted 22 October 2007 - 03:43 PM

rearly like how this looks not downloaded yet but am about 2. oh and btw is this the same system u used in ur worms game which is btw exelent
  • 0

#68 Alert Games

Alert Games

    GMC Member

  • GMC Member
  • 1118 posts
  • Version:GM8

Posted 29 October 2007 - 07:51 PM

Very nice. Its only for one genre really: toon/kids/arcade.

But it is really nice for that.
  • 0

#69 Mordi

Mordi

    Maker of Menus

  • New Member
  • 3635 posts

Posted 30 October 2007 - 01:46 AM

rearly like how this looks not downloaded yet but am about 2. oh and btw is this the same system u used in ur worms game which is btw exelent

<{POST_SNAPBACK}>

Not exactly (as of version 1.71) but has many similarities in the way it functions.

Very nice. Its only for one genre really: toon/kids/arcade.

<{POST_SNAPBACK}>

No no no, you have it wrong. The simple one i made looks like a kids game, but if you customise the menu you naturally have full control over its functions. You can customise everything (everything) easily.

Just look at these other menus i made with this:
Horror?
Futuristic?
Stylistic?
  • 0

#70 cooldude2222

cooldude2222

    GMC Member

  • New Member
  • 250 posts

Posted 09 November 2007 - 08:47 AM

may i know how u customise the looks of the menu?
im a newbie so yea.
  • 0

#71 BrokenGlass

BrokenGlass

    GMC Member

  • New Member
  • 524 posts

Posted 17 November 2007 - 09:00 AM

I love seeing this after i try to merge and run

___________________________________________
COMPILATION ERROR in Script: sc_menu_draw
Error in code at line 1:
//Script written by Mordi//First of all, set the font to use:draw_set_font(menu_font);//Set draw variables:draw_set_halign(1);draw_set_valign(1);//(Needs to be like this, or else you will have an ugly looking menu.)//Draws one of the menus.var m_c;m_c = 0;for(o=1; o<m_num+1; o+=1){//We dont draw menus that shouldnt be drawn.if scroll[o-1] > 0.2{m_c = o-1;var i, xx, yy, w, h, h_ex, col1, col2, col3, sc, alpha, menu, anim;//What menu is to be drawn?menu = m_c+1//Positions:xx = b_x[menu];yy = b_y[menu]+(scroll[m_c]-10)*40;//Width:w = 0;//Height:h = 0;//Extra Height:h_ex = 0;//Colors:col1 = b_col1;col2 = b_col2;col3 = b_col3;//Scale:sc = m_scale[m_c+1]//Alpha value:alpha = scroll[m_c]/10if alpha>1 { alpha=1 }//Animated background variable:anim = b_anim[menu]//First we get how wide this menu is:for(i=1; i<b_num[menu]; i+=1){if (b_active[i,menu]=true){ var w_str, str_ex; str_ex = ""; if (b_inputvar[i,menu] != "") { if (input_active = 0) { str_ex += string(variable_local_get(b_inputvar[i,menu])); } else { str_ex += keyboard_string; } } if (b_variable[i,menu] != "") { str_ex += string(variable_local_get(b_variable[i,menu])); str_ex += "0." } w_str = b_str[i,menu] + str_ex; if (menu_width[menu]=0) { if (string_width(w_str)*sc>w) { w = string_width(w_str)*(sc) } } else { w = menu_width[menu]; } if (string_height(w_str)*sc>h) { b_spc = string_height(w_str)*(sc) + b_space_ex } if (b_separator[i,menu] = true) { h_ex += 10*sc; }} }b_spc -= sc*9;//Get the height of the menu:for(i=1; i<b_num[menu]; i+=1){ if (b_active[i,menu] = true) { h += b_spc; }}h += h_ex;//We must expand the width and height slightly, to get some air between borders and buttons:w += 4h += 8*sc;//Do we need to roll up the menu?if (b_roll_active = true){ if (round(yy) = b_y[menu] and b_menu = menu and ( (yy)+(b_num[menu]*b_spc)>room_height )) { if (yy)+(b_button*b_spc)+(b_spc*3) > room_height+b_roll { b_roll_to = round((yy)+(b_button*b_spc)+(b_spc*3)-room_height); } else { if round((yy)+(b_button*b_spc)-b_roll)-(b_spc*3) < 0 and b_button!=0 { b_roll_to = round((yy)+(b_button*b_spc))-(b_spc*3); } } }}else{b_roll_to = 0;} //Take into effect the rolling of the menu:yy -= b_roll;//Now we draw the menu's backdrop:draw_set_color(col1)draw_set_alpha(alpha*
b_back_a)draw_box(xx-w/2,yy-2,xx+w/2,yy+h, 1, draw_get_alpha(), alpha, anim, menu_title[menu]);//Some y offset so the text is drawn perfectly into the menu:yy -= 0.38*b_spc;//Check if mouse is on the buttons:if (menu_control != 1 and menu = b_menu){ var yym; yym = 0; for(i=1; i<b_num[menu]; i+=1) { if (b_active[i,menu]=false) { yym += b_spc; } var m_in; m_in = mouse_area(xx-w/2,yy -yym -b_spc/2-b_spc+i*(b_spc)+b_spc,xx+w/2,yy -yym +b_spc/2+i*(b_spc)); if (m_in = true and input_active = 0 and (sm_active = false and scroll[m_num]<5) and b_active[i,menu]=true) { if (b_button != i) and !(mouse_x=mouse_xprev and mouse_y=mouse_yprev) { sound_play(menu_snd_select) b_button = i; } if mouse_check_button_pressed(mb_left) and mouse_visible > 0 and b_button!=0 { if !(b_action_l[b_button,b_menu]="") { if (mouse_area(xx-w/2,yy -yym -b_spc/2-b_spc+i*(b_spc)+b_spc,xx-w/2+w/8,yy -yym +b_spc/2+i*(b_spc))) { sound_play(menu_snd_select); execute_string(b_action_l[b_button,b_menu]); } } if !(b_action_r[b_button,b_menu]="") { if (mouse_area(xx+w/2-w/8,yy -yym -b_spc/2-b_spc+i*(b_spc)+b_spc,xx+w/2,yy -yym +b_spc/2+i*(b_spc))) { sound_play(menu_snd_select); execute_string(b_action_r[b_button,b_menu]); } } if ( !(b_action_l[b_button,b_menu]="" and b_action_r[b_button,b_menu]="") and (mouse_area(xx-w/2+w/8,yy -yym -b_spc/2-b_spc+i*(b_spc)+b_spc,xx+w/2-w/8,yy -yym +b_spc/2+i*(b_spc))) ) or (b_action_l[b_button,b_menu]="" and b_action_r[b_button,b_menu]="") { b_button = i; if (b_inputvar[i,menu]!="") { sound_play(menu_snd_select); input_active = i; keyboard_string = string(variable_local_get(b_inputvar[i,menu])); input_oldvalue = string(variable_local_get(b_inputvar[b_button,b_me
nu])); } else { sc_action(); } } } break; } else { if (m_in = false and b_button = i and (mouse_x!=mouse_xprev and mouse_y!=mouse_yprev)) and (input_active = 0 and sm_active = false) { b_button = 0; } } }} //Now draw the buttons:draw_set_color(col2)var str;for(i=1; i<b_num[menu]; i+=1){if (b_active[i,menu] = true){ str = b_str[i,menu] if (b_button = i or input_active = i) and sm_active = false { if (b_effect[i,menu])<1 and b_menu = menu { b_effect[i,menu] += (b_spd/10)-b_effect[i,menu]/(b_spd*10) } } else { if (b_effect[i,menu]) > 0 { b_effect[i,menu] -= b_effect[i,menu]/(b_spd*10) } } var bs; //Button scale: bs = (b_effect[i,menu]/(b_eff)+(0.7))*sc; draw_set_alpha((b_effect[i,menu]*2+0.5)*alpha) if !(b_action_l[i,menu]="" and b_action_r[i,menu]="") { draw_set_halign(0) //Handle effect for the arrows: if (mouse_visible > 0 and input_active = 0 and sm_active = false) { if (mouse_area(xx-w/2,yy-b_spc/2-b_spc+i*(b_spc)+b_spc,xx-w/2+w/8,yy+b_spc/2+i*(b_spc))) { if b_effect_l[i,menu]<sc*0.5 { b_effect_l[i,menu] += 0.1; } } else { if b_effect_l[i,menu]>0 { b_effect_l[i,menu] -= 0.1; } } if (mouse_area(xx+w/2-w/8,yy-b_spc/2-b_spc+i*(b_spc)+b_spc,xx+w/2,yy+b_spc/2+i*(b_spc))) { if b_effect_r[i,menu]<sc*0.5 { b_effect_r[i,menu] += 0.1; } } else { if b_effect_r[i,menu]>0 { b_effect_r[i,menu] -= 0.1; } } } else { if b_effect_l[i,menu]>0 { b_effect_l[i,menu] -= 0.1; } if b_effect_r[i,menu]>0 { b_effect_r[i,menu] -= 0.1; } } if (b_variable[i,menu]!="") { //Button variable value: var str_; str_ = string(variable_local_get(b_variable[i,menu])); draw_set_halign(2) if (b_shadows = true) { draw_text_transformed_color(xx+w/2-(sc*18),yy+i*(b_spc)+2,str_, bs, bs, 0,c_black,c_black,c_black,c_black,draw_get_alpha()/2) } draw_text_transformed(xx+w/2-(sc*18)-2,yy+i*(b_spc),str_, bs, bs, 0) draw_set_halign(0) } //Main button string: if (b_shadows = true) { draw_text_transformed_color(xx-w/2+(sc*18)+2,yy+i*(b_spc)+2,str, bs, bs, 0,c_black,c_black,c_black,c_black,draw_get_alpha()/2) } draw_text_transformed(xx-w/2+(sc*18),yy+i*(b_spc),str, bs, bs, 0) //Arrows: draw_set_halign(1) if (b_shadows = true) { draw_text_transformed_color(xx+w/2-(sc*7)-(b_effect_r[i,menu]*4),yy+i*(b_spc)+2,">", bs + b_effect_r[i,menu], bs + b_effect_r[i,menu], 0,c_black,c_black,c_black,c_black,draw_get_alpha()/2) } draw_text_transformed(xx+w/2-(sc*7)-2-(b_effect_r[i,menu]*4),yy+i*(b_spc),">", bs + b_effect_r[i,menu], bs + b_effect_r[i,menu], 0) if (b_shadows = true) { draw_text_transformed_color(xx-w/2+(sc*7)+2+(b_effect_l[i,menu]*4),yy+i*(b_spc)+2,"<", bs + b_effect_l[i,menu], bs + b_effect_l[i,menu], 0,c_black,c_black,c_black,c_black,draw_get_alpha()/2) } draw_text_transformed(xx-w/2+(sc*7)+(b_effect_l[i,menu]*4),yy+i*(b_spc),"<", bs + b_effect_l[i,menu], bs + b_effect_l[i,menu], 0) } else { if (b_variable[i,menu]!="" or b_inputvar[i,menu]!="") { //A variable is attached: var str_; str_ = ""; if b_inputvar[i,menu]!="" { if (input_active = i) { str_ = keyboard_string; if input_alpha = 1 { draw_rectangle_color(xx+w/2-(sc*20),yy-(b_spc/2)+(i*b_spc)-(sc*2),xx+w/2,yy+(b_spc/2)+(i*b_spc),c_black,c_black,c_black,c_black,0) } } else { str_ = string(variable_local_get(b_inputvar[i,menu])); } } if b_variable[i,menu]!="" { str_ = string(variable_local_get(b_variable[i,menu])); } draw_set_halign(0) if (b_shadows = true) { draw_text_transformed_color(xx-w/2+2+(sc*3),yy+i*(b_spc)+2,str, bs, bs, 0,c_black,c_black,c_black,c_black,draw_get_alpha()/2) } draw_text_transformed(xx-w/2+(sc*3),yy+i*(b_spc),str, bs, bs, 0) draw_set_halign(2) if (b_shadows = true) { draw_text_transformed_color(xx+w/2+2-(sc*3),yy+i*(b_spc)+2,str_, bs, bs, 0,c_black,c_black,c_black,c_black,draw_get_alpha()/2) } draw_text_transformed(xx+w/2-(sc*3),yy+i*(b_spc),str_, bs, bs, 0) } else { //Its just a regular button: draw_set_halign(1) if (b_shadows = true) { draw_text_transformed_color(xx+2,yy+i*(b_spc)+2,st
r, bs, bs, 0,c_black,c_black,c_black,c_black,draw_get_alpha()/2) } draw_text_transformed(xx,yy+i*(b_spc),str, bs, bs, 0) } } //Now we check for separators here: if (b_separator[i,menu] = true) { yy += 10*sc; draw_set_alpha(1); //Draw separator sprite: draw_sprite_ext(s_boxside_light, box_outl, xx+w/2, yy+(i*b_spc)+(12*sc), 1, w, 270, b_col3, alpha) var shine_w; if (w<300) { shine_w = w/300 } else { shine_w = 1 } draw_sprite_ext(s_box_shine_side, box_outl, xx+w/2, yy+(i*b_spc)+10, 1, shine_w, 270, c_white, alpha) } }else { //Button is not active, so we shouldnt make the next buttons bump down: yy-=b_spc; }}}}//Update mouse previous coordinates:mouse_xprev = mouse_x;mouse_yprev = mouse_y;//Draw message if it activated:if (scroll[m_num]>0.1){ var mx, my, mw, mh; mx = room_width/2; my = room_height/2+scroll[m_num]*30-300; mw = sm_width; draw_set_alpha(scroll[m_num]/20); draw_set_color(c_black); draw_rectangle(0,0,room_width,room_height,0); draw_textbox(sm_string, mx, my, mw, 28, 1, m_num+1, sm_title,0); if (sm_keygrab = false) { //Okay: Here comes some hard-code for making one button. This needed to be done to achieve the desired effect. var yyy, www, hhh, btstr, aaa, scale; btstr = "OK"; www = string_width_ext(btstr,28,mw)+3; hhh = string_height_ext(btstr,28,mw); yyy = my+(string_height_ext(sm_string,28,mw))/2+hhh; aaa = scroll[m_num]/10 scale = sm_bscale; //Check mouse actions for button: if (mouse_area(mx-www/2, yyy-hhh/2, mx+www/2, yyy+hhh/2)) and (scroll[m_num]>9.5) { if (sm_bscale < 1) { sm_bscale += 0.1-sm_bscale/10; } if (sm_bset = false) { sound_play(menu_snd_select); } sm_bset = true; if (mouse_check_button_pressed(mb_left)) { sc_hide_message(); } } else { if (sm_bscale > 0) { sm_bscale -= sm_bscale/10; } sm_bset = false; } //Draw small back-box: draw_box(mx-www/2,yyy-hhh/2-2,mx+www/2,yyy+hhh/2, 1, b_back_a*aaa, aaa, anim, ""); //Its just a regular button: draw_set_halign(1) if (b_shadows = true) { draw_text_transformed_color(mx+2,yyy+2,btstr, scale*0.5+0.5, scale*0.5+0.5, 0,c_black,c_black,c_black,c_black,draw_get_alpha()/2) } draw_text_transformed(mx,yyy,btstr, scale*0.5+0.5, scale*0.5+0.5, 0) }}

at position 439: Variable name expected.
  • 0

#72 death-droid

death-droid

    GMC Member

  • GMC Member
  • 2600 posts

Posted 18 November 2007 - 06:40 AM

Can you please change host to a difrent one like 64digits please
  • 0

#73 BrokenGlass

BrokenGlass

    GMC Member

  • New Member
  • 524 posts

Posted 18 November 2007 - 08:00 AM

I dont get why every time i merge it doesnt work...
  • 0

#74 DragonFire

DragonFire

    GMC Member

  • New Member
  • 146 posts

Posted 21 November 2007 - 12:13 AM

Just a quick question: does anyone know how to get a file loading system to work as a menu? So that the filename would appear as the button name and selecting it would load the game?
  • 0

#75 LucarioMaster86

LucarioMaster86

    GMC Member

  • New Member
  • 26 posts

Posted 06 December 2007 - 02:45 AM

This looks really cool, only I'm unregistered. Is it possible to make it compatible for all the unreg people?
  • 0

#76 Mordi

Mordi

    Maker of Menus

  • New Member
  • 3635 posts

Posted 06 December 2007 - 02:43 PM

This looks really cool, only I'm unregistered.  Is it possible to make it compatible for all the unreg people?

<{POST_SNAPBACK}>

It is possible, but you'd have to do it yourself.
  • 0

#77 c_raethke

c_raethke

    TeamSkyfire

  • GMC Member
  • 2010 posts

Posted 10 December 2007 - 01:49 PM

For some reason the < Buttons > aren't centered, so the < keeps overlapping when you move over it.
  • 0

#78 Mordi

Mordi

    Maker of Menus

  • New Member
  • 3635 posts

Posted 10 December 2007 - 01:54 PM

For some reason the < Buttons > aren't centered, so the < keeps overlapping when you move over it.

<{POST_SNAPBACK}>

Try making the menu wider. You can also modify the code to draw it centered, but I found it best making it go toward the button. Its in the sc_draw_menu() script somewhere. :lol:
  • 0

#79 c_raethke

c_raethke

    TeamSkyfire

  • GMC Member
  • 2010 posts

Posted 10 December 2007 - 10:33 PM

Yeah, I know where it is, but I didn't want to do too much modding. I just made the arrows not blow up as much.
BTW, this engine is pretty sweet.

EDIT: I might have missed something, but how do I check which menu is being shown?

Edited by c_raethke, 11 December 2007 - 01:20 PM.

  • 0

#80 Mordi

Mordi

    Maker of Menus

  • New Member
  • 3635 posts

Posted 11 December 2007 - 01:56 PM

EDIT: I might have missed something, but how do I check which menu is being shown?

<{POST_SNAPBACK}>

That would be "menu_current" i think. Just check the "sc_menu_ini()" script to confirm.
  • 0

#81 008008

008008

    GMC Member

  • New Member
  • 45 posts

Posted 11 December 2007 - 04:53 PM

Cool! It looks so profesional! :)
  • 0

#82 c_raethke

c_raethke

    TeamSkyfire

  • GMC Member
  • 2010 posts

Posted 11 December 2007 - 10:13 PM

Found it, it's b_menu. I tried b_menu before, but it was was in a different instance than the menu one and, obviously, it didn't work.
  • 0

#83 epitom3

epitom3

    GMC Member

  • New Member
  • 38 posts

Posted 13 December 2007 - 04:36 PM

VERY well done. Looks professional and works really well. There are some user friendly things that can be added (or I couldnt find). In the sc_menu_add for the 2nd argument you are able to change the font, however, this doesnt translate into the menu title. It would be easier if you added another argument to be able to change that as well. This goes along with the show message script, as I couldnt change the size of the text.

Another thing I would love to see is a mouse over function for the buttons.

Also, these scripts can be used in many ways, not just as the opening menus. If you added the ability to use the borders and the menu for just text like a text box without darkening the whole screen, many people would use this for rpgs.

hahaha just a few suggestions. cant wait for the next update :P

Edited by epitom3, 13 December 2007 - 04:51 PM.

  • 0

#84 DragonFire

DragonFire

    GMC Member

  • New Member
  • 146 posts

Posted 15 December 2007 - 09:42 PM

How do you get the buttons to display variable names as the button text?
  • 0

#85 ashsashs

ashsashs

    GMC Member

  • New Member
  • 240 posts

Posted 16 December 2007 - 09:31 AM

I dont know if this matters, i get 4 FPS in the information section and i get 8-12 FPS in the first two menu's. P.S. could you add your script/tutorial/example to one of these sections:

scripts section or
Tutorials and Examples

Edited by ashsashs, 16 December 2007 - 09:33 AM.

  • 0

#86 c_raethke

c_raethke

    TeamSkyfire

  • GMC Member
  • 2010 posts

Posted 19 December 2007 - 12:21 AM

When I try to use the keygrab it says "unknown variable key_str or array index out of bounds."
I don't think I'm doing anything wrong, but I used
sc_show_keygrab('Press key to accelerate','Controls','p1_up')
also tried no quotes.
  • 0

#87 Mordi

Mordi

    Maker of Menus

  • New Member
  • 3635 posts

Posted 20 December 2007 - 06:35 AM

When I try to use the keygrab it says "unknown variable key_str or array index out of bounds."
I don't think I'm doing anything wrong, but I used
sc_show_keygrab('Press key to accelerate','Controls','p1_up')
also tried no quotes.

<{POST_SNAPBACK}>

You have to do it like this:
sc_menu_add_button("AIM DOWN","sc_show_keygrab('Press a key.','AIM DOWN','global.k_down1')",0,"","","key_down_str1");
Perhaps I failed to mention that in the description. :whistle:
  • 0

#88 Mordi

Mordi

    Maker of Menus

  • New Member
  • 3635 posts

Posted 20 December 2007 - 06:39 AM

How do you get the buttons to display variable names as the button text?

<{POST_SNAPBACK}>

You need to write the variable name as a string. For example: "x" or "y".
You can only use local variables, if I remember correctly.
  • 0

#89 c_raethke

c_raethke

    TeamSkyfire

  • GMC Member
  • 2010 posts

Posted 20 December 2007 - 01:43 PM

Hmmm... It still does it. Using the exact code you posted.
  • 0

#90 Mordi

Mordi

    Maker of Menus

  • New Member
  • 3635 posts

Posted 20 December 2007 - 07:22 PM

Hmmm... It still does it. Using the exact code you posted.

<{POST_SNAPBACK}>

Really? Hmmm... Weird. I will investigate further later.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users