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.

2.7.1 menus

Learn more on how to use Sandbox, or submit your own tutorials or resources.
Post Reply
northstar
Member
Member
Posts: 208
Joined: March 1st, 2012, 1:17 pm
Name: steven

2.7.1 menus

Post by northstar »

small scripts for those in 2.7.1

Image

Code: Select all

lightset = [
    lightr = $arg1
    lightg = $arg2
    lightb = $arg3
    if (= $lightbright 0) lightscale
]

lightscale = [
    if (= $lightbright 0) [
        lightr = (div $lightr 2); lightg = (div $lightg 2); lightb = (div $lightb 2)
    ] [
        lightr = (min 255 (* $lightr 2)); lightg = (min 255 (* $lightg 2)); lightb = (min 255 (* $lightb 2))
    ]
]	
	
lightcmd = [result (concat newent light $lightradius $lightr $lightg $lightb)]

newgui newlight [
    guibutton "sunlight"    "newent light 0 255 255 255"    
	guibutton "spotlight"	"newent spotlight"
	guibar
	guibutton (lightcmd)
    guibar
    guitext "color:"
    guicolor (+ (* (+ (* $lightr 256) $lightg) 256) $lightb)
    guislider lightr 0 255
    guislider lightg 0 255
    guislider lightb 0 255
    guilist [
        guicheckbox "bright"    lightbright 1 0 [lightscale]
        guibar
        guiradio "white"        lightcolour 0 [lightset 255 255 255]
        guiradio "Orange"	    lightcolour 1 [lightset 255 127 0]
        guiradio "yellow"       lightcolour 2 [lightset 255 255 192]
        guiradio "purple"       lightcolour 3 [lightset 255 192 255]        
		guiradio "aqua"    		lightcolour 4 [lightset 0 255 255]		
    ]
    guitext "radius:"
    guislider lightradius 0 1024
]
you can delete newlight 2 & 3 if you wish, or keep them to set custom colors on the preset row... (you might search the menus to see if NL 2&3 are in other menus)
EDIT: newlight 2 & 3 are only located in the "old" newlight
northstar
Member
Member
Posts: 208
Joined: March 1st, 2012, 1:17 pm
Name: steven

Re: 2.7.1 menus

Post by northstar »

Image

Code: Select all

newgui autograss [
guilist [
	guilist [
		guitext "grass dist"
		guitext "grass taper"
		guitext "grass step"
		guitext "grass height"
		guitext "grass scale"	
		guitext "grass anim m/s"
		guitext "grass anim scale"	
		]
	guibar
	guilist [
		guifield "grassdist"
		guifield "grasstaper"
		guifield "grassstep"
		guifield "grassheight"
		guifield "grassscale"
		guifield "grassanimmillis"
		guifield "grassanimscale"
		]
	]		
]

//guibutton "autograss" "showgui autograss"
just put the guibutton wherever you wish...
northstar
Member
Member
Posts: 208
Joined: March 1st, 2012, 1:17 pm
Name: steven

Re: 2.7.1 menus

Post by northstar »

just my quickedit menu... speeds things up... (shrug) works for me...

Image

Code: Select all

quickeditmenu = [
	guibutton "Savemap" "showgui savemap"
	guibutton "Loadmap" "showgui loadmap"
	guibar
	guibutton "Full Light" "calclight 1"
	guibutton "Patch Light" "patchlight 1"
	guibutton "Quick Light" "calclight -1"
	guibutton "Optimize map" "remip"
	guibar
	guibutton "New Entity" "newent light 64 240 200 150"
	guibutton "autograss" "showgui autograss"
	guibutton "waypoints" "showgui waypoints"
]

newgui quickedit [
	@quickeditmenu	
	guitab "blend" 
		guitext (concat (getblendbrushname (curblendbrush)))
		guistayopen [guilist [
		guibutton "Prev" [nextblendbrush -1] arrow_bw
		guistrut 2
		guibutton "Next" [nextblendbrush 1] arrow_fw
		]
		]	
		guistayopen 
		guistrut 1
		guitext "Mode"
		guiradio "off" blendpaintmode 0
		guiradio "replace" blendpaintmode 1
		guiradio "dig" blendpaintmode 2
		guiradio "fill" blendpaintmode 3
		guiradio "inverted dig" blendpaintmode 4
		guiradio "inverted fill" blendpaintmode 5		
	
]

newgui autograss [
guilist [
	guilist [
		guitext "grass dist"
		guitext "grass taper"
		guitext "grass step"
		guitext "grass height"
		guitext "grass scale"	
		guitext "grass anim m/s"
		guitext "grass anim scale"	
		]
	guibar
	guilist [
		guifield "grassdist"
		guifield "grasstaper"
		guifield "grassstep"
		guifield "grassheight"
		guifield "grassscale"
		guifield "grassanimmillis"
		guifield "grassanimscale"
		]
	]		
]



//clearwaypoints
//removewaypoint Index
//removewaypointlink First Second

newgui waypoints [
	guibutton "show waypoints"		[debug 32]
	guibutton "hide waypoints"		[debug 0]
	guibar
	guibutton "drop waypoints"		[dropwaypoints 1]
	guibutton "autofill waypoints"	[experimentalwaypoint 1]
	guibar	
	guibutton "save waypoints"		 [savewaypoints]
]
Last edited by northstar on September 27th, 2014, 11:40 am, edited 1 time in total.
User avatar
Mike
Administrator
Administrator
Posts: 871
Joined: May 24th, 2009, 12:52 pm

Re: 2.7.1 menus

Post by Mike »

Thank you so much for sharing all of these wonderful edits! A big part of the new release will trying to make the menus as possible so this helps a lot! You would also be welcome to be a member of the github. And btw you can chat with us on IRC through the web browser client too:
http://www.sandboxgamemaker.com/wiki/in ... t_The_Team

As a note I will be creating a NEW github, the one up there now will be archived probably. Take care!
-mike
Sign up for our Newsletter to keep up to date with the Sandbox news!
We also have a facebook page, facebook group, myspace page and a twitter page[/b][/color]!
northstar
Member
Member
Posts: 208
Joined: March 1st, 2012, 1:17 pm
Name: steven

Re: 2.7.1 menus

Post by northstar »

thank you mike... you are very kind

don't know that i'm really qualified to do or say anything... yet... i'm just sort of mixing and matching, copying and pasting... don't really know the why's of how most things work yet... and i make a lot of mistakes, and sometimes jump to a lot of erroneous conclusions

i've seen some of the great games created in sandbox, and i feel quite humbled with my simple little game here... but most of all i'm just having fun... i look forward to the new github and will certainly look in

steve
northstar
Member
Member
Posts: 208
Joined: March 1st, 2012, 1:17 pm
Name: steven

Re: 2.7.1 menus

Post by northstar »

my skybox menu...

Image
Image
Image

Code: Select all

skyboxes = "barren daysky meadow hill trough starfield"
numcloudlayers = 5

newgui skies [	
	guilist [
		guilist [			
		genskyitems $skyboxes skyboxes skybox
		]
		guibar
		showskyshot	
		guibar		
		guilist [
		guititle "Skyboxes"
		guilist [
		guitext "Spin:		"
		guifield spinsky -8
		]
		guilist [
		guitext "Yaw:		"
		guifield yawsky -8
		]
		guistrut 2
		guitext "Colour (RGB)"
		guilist [
		setcollevels skycol $skyboxcolour
		colfieldsb skycol skyboxcolour []
		]
		]		
	]	
	guitab "Cloudlayers"
	guilist [
		guistayopen [
		guilist [
		guibutton "Empty" "cloudlayer ^"^"" skybox
		loop i $numcloudlayers [
		guibutton (concatword "clouds " (+ $i 1)) (format "cloudlayer clouds/clouds%1" (+ $i 1))
		]
		]
		guibar
		guiimage (format "<scale:128,128>packages/%1" (at $guirolloveraction 1)) $skyload 4 1 data/rpg/logo
		guibar
		guilist [
		guititle "Cloudlayers"
		guilist [
		guitext "Alpha:	"
		guifield cloudalpha -8
		]
		guilist [
		guitext "Fade:	"
		guifield cloudfade -8
		]
		guilist [
		guitext "Height:	"
		guifield cloudheight -8
		]
		guilist [
		guitext "Scale:	"
		guifield cloudscale -8
		]
		guilist [
		guitext "Scroll-X:	"
		guifield cloudscrollx -8
		]
		guilist [
		guitext "Scroll-Y:	"
		guifield cloudscrolly -8
		]
		guilist [
		guitext "Spin:		"
		guifield spincloudlayer -8
		]
		guilist [
		guitext "Yaw:		"
		guifield yawcloudlayer -8
		]
		guistrut 1
		guitext "Colour (RGB)"
		guilist [
		setcollevels "layercol" $cloudcolour
		colfieldsb layercol cloudcolour []
		]
		]			
		]
	]
	guitab "Fogdome"
	guilist [
		guilist [			
		guititle "Fogdome"
		guilist [
		guicheckbox "Cap:		" fogdomecap
		guifield fogdomecap -8
		]
		guilist [
		guitext "Clip:		"
		guifield fogdomeclip -8
		]
		guilist [
		guitext "Height:	"
		guifield fogdomeheight -8
		]
		guilist [
		guitext "Min:		"
		guifield fogdomemin -8
		]
		guilist [
		guitext "Max:		"
		guifield fogdomemax -8
		]
		guistrut 1
		guitext "Colour (RGB)"
		guilist [
		setcollevels fdcol $fogdomecolour
		colfieldsb fdcol fogdomecolour []
		]
		]
			
	]
] "Skyboxes"
all of my skyboxes are located in one folder, skyboxes

ADD: i suppose i should add...

Code: Select all

masterterms = 0
newskypath = "skyboxes/starfield"

genskyitems = [
	guitext $arg2
	guistayopen [
		looplist f $arg1 [
			guibutton $f (format "%1 %2/%3" $arg3 $arg2 $f)
		]
	]
]
skyload = [
	if (>= (strstr "cloudbox skybox" (at $guirolloveraction 0)) 0) [
		guirolloveraction
	] [
		skybox $skybox
	]
]
showskyshot = [
	guistayopen [
		guilist [
			guiimage (format "<scale:128,128>packages/%1%2" (at $guirolloveraction 1) _ft) $skyload 4 1 data/rpg/logo			
		]		
	]
]
Post Reply