Page 1 of 2
Making a button in the menu open a map.
Posted: October 1st, 2010, 9:59 pm
by daltonds1
This is basicly just like a PLAY GAME Button
go to
\2.5\data\lang\en
Open menus.cfg
search
Code: Select all
guibutton "Jukebox" "showgui jukebox"
You will see this
Code: Select all
guibutton "Toggle Editmode (e)" "edittoggle"
guibutton "Load Map" "showgui maps; MODE = (getmode); mode (getmode); initmapgui"
guibutton "Load Custom Map" "showgui loadmap"
guibutton "Multiplayer" "showgui multiplayer"
guibutton "Help" "showgui help"
guibar
guibutton "Options" "showgui options"
guibutton "Jukebox" "showgui jukebox"
guibutton "Change Skill Level" "showgui skilllvl"
guibutton "About" "showgui authors"
guibutton "Exit The Game" quit exit
]
Under one of these lines add this
Now were it says dalton you will change it to your map name.
Now im not sure if this will work in in game but it probably will
Re: Making a button in the menu open a map.
Posted: October 2nd, 2010, 7:24 am
by Runescapedj
daltonds1 wrote:Now im not sure if this will work in in game but it probably will
Why don't you test it than be4 u post it?
Re: Making a button in the menu open a map.
Posted: October 2nd, 2010, 7:55 am
by PizzaLover101
yeah, it does, let me find an easier script though....
Code: Select all
newgui maps [
guilist [
guilist [
genmapitems $mainmaps
]
showmapshot
]
guitab "My Maps"
guilist [
guilist [
genmapitems $mymaps1
]
showmapshot
]
]
So, pretty much, you just have to add in stuff, like you can do this and it will work
Re: Making a button in the menu open a map.
Posted: October 2nd, 2010, 11:45 am
by daltonds1
I dont see how its easier you just add guibutton "Play" [sp "dalton"]
Re: Making a button in the menu open a map.
Posted: October 2nd, 2010, 2:23 pm
by PizzaLover101
True.......but i think mine was for a specific map...
Re: Making a button in the menu open a map.
Posted: October 17th, 2010, 6:32 am
by klimyriad
I got a better scripted
Code: Select all
First go to data/lang and find menu
Add the first part which is below to the menu''s you need to find first the menu's look like this
main = [
guilist [
if (= $editing 1) [
guilist [
guibutton "Newmap" "showgui newmap"
guibutton "Savemap" "showgui savemap"
guibar
guibutton "New particle" "showgui newparticles"
guibutton "New light" "showgui newlight"
guibutton "New Mapmodel" "showgui mapmodels"
guibutton "Find Entities (F5)" "showgui entfind"
guibutton "Editing GUI" "showgui editing"
guibutton "Edit Materials" "showgui materials"
guibutton "Quickedit Menu (F3)" "showquickgui"
guibutton "Texture Menu (F2)" "showtexgui"
]
guibar
]
guilist [
guibutton "Toggle Editmode (e)" "edittoggle"
guibutton "Load Map" "showgui maps; MODE = (getmode); mode (getmode); initmapgui"
guibutton "Load Custom Map" "showgui loadmap"
guibutton "Multiplayer" "showgui multiplayer"
guibutton "Help" "showgui help"
guibar
guibutton "Options" "showgui options"
guibutton "Jukebox" "showgui jukebox"
guibutton "Change Skill Level" "showgui skilllvl"
guibutton "About" "showgui authors"
guibutton "Exit The Game" quit exit
]
]
]
Add this in to the menu's guibutton "Play" "showgui play"
so it looks like this.
main = [
guilist [
if (= $editing 1) [
guilist [
guibutton "Newmap" "showgui newmap"
guibutton "Savemap" "showgui savemap"
guibar
guibutton "New particle" "showgui newparticles"
guibutton "New light" "showgui newlight"
guibutton "New Mapmodel" "showgui mapmodels"
guibutton "Find Entities (F5)" "showgui entfind"
guibutton "Editing GUI" "showgui editing"
guibutton "Edit Materials" "showgui materials"
guibutton "Quickedit Menu (F3)" "showquickgui"
guibutton "Texture Menu (F2)" "showtexgui"
]
guibar
]
guilist [
guibutton "Play" "showgui play"
guibutton "Toggle Editmode (e)" "edittoggle"
guibutton "Load Map" "showgui maps; MODE = (getmode); mode (getmode); initmapgui"
guibutton "Load Custom Map" "showgui loadmap"
guibutton "Multiplayer" "showgui multiplayer"
guibutton "Help" "showgui help"
guibar
guibutton "Options" "showgui options"
guibutton "Jukebox" "showgui jukebox"
guibutton "Change Skill Level" "showgui skilllvl"
guibutton "About" "showgui authors"
guibutton "Exit The Game" quit exit
]
]
]
Then when you done that scroll right to the bottum and add the below in make sure it is at the button.
newgui play [
guibutton "playmap" [map dalton]
guibar
showmapshot "dalton"
]
There you go you now can play and see a mapshot of your map.
This code you be able to play right away but also see if it is the right map so if it not you can change it please note you will have to change your mapshot to the name dalton too.
Please this scripted has been tested on 2.5 and does work.
Re: Making a button in the menu open a map.
Posted: October 17th, 2010, 11:55 am
by daltonds1
Those codes are not simpler then mine
MINE IS 1 LINE
Yours is like tons
Re: Making a button in the menu open a map.
Posted: October 17th, 2010, 4:51 pm
by chocolatepie33
His is tons because he just copied and modified the menu code parts, so his is really maybe about 4-6 lines long.
Re: Making a button in the menu open a map.
Posted: October 17th, 2010, 5:19 pm
by daltonds1
Again mine is easier
Re: Making a button in the menu open a map.
Posted: October 17th, 2010, 9:34 pm
by chocolatepie33
maybe, but his pulls up a new menu, and shows you a picture.