Hi! Welcome to the forum for Platinum Arts Sandbox Free 3D Game Maker. I currently have the forums locked as I am attempting to properly update them.

In the meantime please join the new Discord Server!

If you have any questions please e-mail me through the Platinum Arts website.

Making a button in the menu open a map.

Learn more on how to use Sandbox, or submit your own tutorials or resources.
daltonds1
Member
Member
Posts: 368
Joined: September 13th, 2010, 12:26 am
Name: Dalton
IRC Username: Daltonds1
Location: Tomball, Texas

Making a button in the menu open a map.

Post 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

Code: Select all

    guibutton "Play" [sp "dalton"]
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
User avatar
Runescapedj
Member
Member
Posts: 1706
Joined: January 9th, 2010, 9:06 am
Name: Michiel
IRC Username: Sandboxdj
Location: Deventer, the Netherlands

Re: Making a button in the menu open a map.

Post 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?
User avatar
PizzaLover101
Member
Member
Posts: 1751
Joined: October 23rd, 2009, 1:33 pm
Name: NAME
IRC Username: DaItsicle
Location: By a computer
Contact:

Re: Making a button in the menu open a map.

Post 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

Code: Select all

guibutton "Quit"
Quit = [quit]
Project 1: Da Chest Collector [TBD]
Project 2: Tis a secret [End of summer] announcement June 22 2011
Project 3: An even bigger secret!

http://pizzagametime.tk/
http://forums.pizzagametime.tk/
daltonds1
Member
Member
Posts: 368
Joined: September 13th, 2010, 12:26 am
Name: Dalton
IRC Username: Daltonds1
Location: Tomball, Texas

Re: Making a button in the menu open a map.

Post by daltonds1 »

I dont see how its easier you just add guibutton "Play" [sp "dalton"]
User avatar
PizzaLover101
Member
Member
Posts: 1751
Joined: October 23rd, 2009, 1:33 pm
Name: NAME
IRC Username: DaItsicle
Location: By a computer
Contact:

Re: Making a button in the menu open a map.

Post by PizzaLover101 »

True.......but i think mine was for a specific map...
Project 1: Da Chest Collector [TBD]
Project 2: Tis a secret [End of summer] announcement June 22 2011
Project 3: An even bigger secret!

http://pizzagametime.tk/
http://forums.pizzagametime.tk/
User avatar
klimyriad
Support Team
Support Team
Posts: 969
Joined: December 23rd, 2009, 1:43 pm
Name: liam
Contact:

Re: Making a button in the menu open a map.

Post 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.
Firstspace the attack Progress. Image
Maps= Image finishing the town of hisal map.
Models and textures Image Just started finding these.
Menus, script's and other stuff. Image
daltonds1
Member
Member
Posts: 368
Joined: September 13th, 2010, 12:26 am
Name: Dalton
IRC Username: Daltonds1
Location: Tomball, Texas

Re: Making a button in the menu open a map.

Post by daltonds1 »

Those codes are not simpler then mine

MINE IS 1 LINE

Yours is like tons
chocolatepie33
Support Team
Support Team
Posts: 2458
Joined: April 27th, 2010, 5:31 pm
IRC Username: CP

Re: Making a button in the menu open a map.

Post 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.
Julius wrote:Contribute to http://www.opengameart.org NOW!
Save the wiki!
daltonds1
Member
Member
Posts: 368
Joined: September 13th, 2010, 12:26 am
Name: Dalton
IRC Username: Daltonds1
Location: Tomball, Texas

Re: Making a button in the menu open a map.

Post by daltonds1 »

Again mine is easier
chocolatepie33
Support Team
Support Team
Posts: 2458
Joined: April 27th, 2010, 5:31 pm
IRC Username: CP

Re: Making a button in the menu open a map.

Post by chocolatepie33 »

maybe, but his pulls up a new menu, and shows you a picture.
Julius wrote:Contribute to http://www.opengameart.org NOW!
Save the wiki!
Post Reply