newmenu editing

menuitem "Mapmodels..."				"showmenu Mapmodels"
menuitem "Lighting..."				"showmenu Lighting"
menuitem "Entities..."				"showmenu Entities"
menuitem "Pickups..."				"showmenu Pickups"
menuitem "Test a skymap..."			"showmenu skymaps"
menuitem "Ambient sounds..."			[ showmenu "Ambient sounds" ]
menuitem "Arches and slopes..."			"showmenu Arches"
menuitem "Map operations..."			[ showmenu "Map operations" ]
menuitem "Bots..."				[ showmenu "Creating bot waypoints" ]
menuitem "Help?"				[ echo "2Please read the AssaultCube README which has a detailed guide on mapediting... ]

//Lighting menu.
newmenu "Lighting"

menuitem "Add white lights	"		[ showmenu "White light" ]
menuitem "Add coloured lights	"		[ showmenu "Coloured light" ]
menuitem "" -1
menuitemcheckbox "Enable fullbright: 	" "$fullbright" [ fullbright $arg1 ]

alias wlight 1
alias wlight1 1

newmenu "White light"

menuitemslider "Light radius: " 1 32 "$wlight" 1 "" "alias wlight $arg1"
menuitemslider "Brightness: " 1 255 "$wlight1" 5 "" "alias wlight1 $arg1"
menuitem "" -1
menuitem "2		    [ OK ]		" "newent light $wlight $wlight1"

alias clight 1
alias clight1 1
alias clight2 1
alias clight3 1

newmenu "Coloured light"

menuitemslider "Light radius: " 1 32 "$clight" 1 "" "alias clight $arg1"
menuitem "" -1
menuitemslider "Red light: " 1 255 "$clight1" 5 "" "alias clight1 $arg1"
menuitemslider "Green light: " 1 255 "$clight2" 5 "" "alias clight2 $arg1"
menuitemslider "Blue light: " 1 255 "$clight3" 5 "" "alias clight3 $arg1"
menuitem "" -1
menuitem "2		    [ OK ]" "newent light $clight $clight1 $clight2 $clight3"

//Entities menu
newmenu Entities

menuitem "RVSF Spawn point"	"newent playerstart 1"
menuitem "CLA Spawn point"	"newent playerstart 0"
menuitem "FFA Spawn point"	"newent playerstart 100"
menuitem "" -1
menuitem "RVSF CTF Flag"	"newent ctf-flag 1"
menuitem "CLA CTF Flag"		"newent ctf-flag 0"
menuitem "" -1
menuitem "Ladder entity"	"saycommand /newent ladder " [ echo "Ensure that you have placed the ladder mapmodel first (found in the mapmodels menu)..." ]
menuitem "Clip entity"		"showmenu Clips" "echo Clips can be used to block off areas that players shouldn't be able to access..."

newmenu "Clips"
alias _clip00 clip; alias _clip00status 0; alias _clip01 0; alias _clip02 1; alias _clip03 1; alias _clip04 1 // Give aliases an initial value.
menuitemslider "Clip type: " 0 1 "$_clip00status" 1 [ Clip "Player Clip" ] "alias _clip00 (at [clip plclip] $arg1); alias _clip00status $arg1"
menuitemslider "Elevation from ground: " 0 50 "$_clip01" 1 "" "alias _clip01 $arg1"
menuitemslider "Length of clip	(X): " 0 50 "$_clip02" 1 "" "alias _clip02 $arg1"
menuitemslider "Width of clip	(Y): " 0 50 "$_clip03" 1 "" "alias _clip03 $arg1"
menuitemslider "Height of clip	(Z): " 0 50 "$_clip04" 1 "" "alias _clip04 $arg1"
menuitem "" -1
menuitem "2		     [ OK ]" "newent $_clip00 $_clip01 $_clip02 $_clip03 $_clip04"

//Pickups menu
newmenu Pickups

menuitem "Health"		"newent health"
menuitem "Pistol Magazine"	"newent pistol"
menuitem "Box of Ammo"		"newent ammobox"
menuitem "Kevlar Vest"		"newent armour"
menuitem "Helmet"		"newent helmet"
menuitem "Akimbo"		"newent akimbo"
menuitem "Grenades"		"newent grenades"

//Arch and slope menu
newmenu Arches

menuitem "Arch with no sideways curves"		"heightfield 2; arch 0"
menuitem "Arch with sideways curves (delta 1)"	"heightfield 2; arch 1"
menuitem "Arch with sideways curves (delta 2)"	"heightfield 2; arch 2"
menuitem "Arch with sideways curves (delta 3)"	"heightfield 2; arch 3"
menuitem "Arch with sideways curves (delta 4)"	"heightfield 2; arch 4"
menuitem "" -1
menuitem "Slope increase 2 left-right"		"heightfield 0; slope 2 0"
menuitem "Slope decrease 2 left-right"		"heightfield 0; slope -2 0"
menuitem "Slope increase 2 top-bottom"		"heightfield 0; slope 0 2"
menuitem "Slope decrease 2 top-bottom"		"heightfield 0; slope 0 -2"
menuitem "Slope increase 1 left-right"		"heightfield 0; slope 1 0"
menuitem "Slope decrease 1 left-right"		"heightfield 0; slope -1 0"
menuitem "Slope increase 1 top-bottom"		"heightfield 0; slope 0 1"
menuitem "Slope decrease 1 top-bottom"		"heightfield 0; slope 0 -1"
menuitem "" -1
menuitem "Fix heightfielding"                    "solid 0; slope 0 0"

newmenu skymaps
menuinit [ echo "Please read: 3/docs/mapediting5.html to find out how to PERMANENTLY add a custom skymap to your map..." ]
menuitem "Steini2 skymap"			[ loadsky "textures/skymaps/steini/steini2" ]
menuitem "Steini3 skymap"			[ loadsky "textures/skymaps/steini/steini3" ]
menuitem "Steini4 skymap"			[ loadsky "textures/skymaps/steini/steini4" ]
menuitem "Rocky skymap"				[ loadsky "textures/skymaps/makke/rocky" ]
menuitem "Mountain skymap"			[ loadsky "textures/skymaps/makke/mountain" ]
menuitem "Iceflow skymap"			[ loadsky "textures/skymaps/iceflow/iceflow" ]
menuitem "Inhcanyons1 skymap"			[ loadsky "textures/skymaps/ladynighthawk/inhcanyons1" ]
menuitem "Nightball skymap"			[ loadsky "textures/skymaps/socksky/nightball" ]
menuitem "Grave skymap"				[ loadsky "textures/skymaps/socksky/grave" ]
menuitem "At sea skymap"			[ loadsky "textures/skymaps/kothic/atsea" ]

alias _closestenttypestatus 0
//Map operations
newmenu "Map operations"

menuitem "Newmap (128x128 cubes - recommended)"	"newmap 7"
menuitem "Newmap (256x256 cubes)"		"newmap 8"
menuitem "Increase mapsize (2x)"		[ mapenlarge; echo "The map size has been increased by 2. However, the new space is solid. To utilize it, you will need to turn it into space, by selecting it and pressing G" ]
menuitem "Create/edit a map message"			"menumapmsg"
menuitem "Change waterlevel"			"saycommand /waterlevel "
menuitem "Change watercolour"			[ showmenu "Water colour" ]
menuitem "Print entity stats"			"entstats"
menuitem "Select the next closest entity"	"nextclosestent"
menuitemcheckbox "Show mapmodel clippings: " "$showmodelclipping" "showmodelclipping $arg1"
menuitemslider "Select only these entities: " 0 15 "$_closestenttypestatus" 1 "All Light Playerstart Pistol Ammobox Grenades Health Armour Akimbo Mapmodel Ladder CTF-flag Sound Clip Helmet PlayerClip" "_closestentslider $arg1"

// "closestenttype" slider...
alias _closestentslider [ closestenttype (at ["" light playerstart pistol ammobox grenades health armour akimbo mapmodel ladder ctf-flag sound clip helmet plclip] $arg1); alias _closestenttypestatus $arg1 ]

// Map-message edit/creation menu
alias menumapmsg [ if (= (strcmp (getmapmsg) "Untitled Map by Unknown") 1) [ showmenu "Create a map message" ] [ showmenu "Edit a map message" ] ]

newmenu "Create a map message"
menuinit [ alias menumapmsgtext "" ]
menuitemtextinput "Enter your map message: "		"" "alias menumapmsgtext $arg1" "" 256
menuitem "2			[ OK ]"			"mapmsg $menumapmsgtext"

newmenu "Edit a map message"
menuinit [ alias menumapmsgtext "" ]
menuitemtextinput "Edit your map message: "	"getmapmsg"	"alias menumapmsgtext $arg1" "" 256
menuitem "2		      [ OK ]"			"mapmsg $menumapmsgtext"


alias redw 1
alias greenw 1
alias bluew 1

newmenu "Water colour"

menuitemslider "Red pigment: " 1 255 "$redw" 5 "" "alias redw $arg1"
menuitemslider "Green pigment: " 1 255 "$greenw" 5 "" "alias greenw $arg1"
menuitemslider "Blue pigment: " 1 255 "$bluew" 5 "" "alias bluew $arg1"
menuitem "" -1
menuitem "2		     [ OK ]" "watercolour $redw $greenw $bluew"

//Mapmodels
newmenu Mapmodels

menuitem "Platforms"	"showmenu Platforms"
menuitem "Ladders/Stairs"	"showmenu Ladders/Stairs"
menuitem "Fencing"		"showmenu Fencing"
menuitem "Plants"     		"showmenu Plants"
menuitem "Lights"     		"showmenu Lights" 
menuitem "Street"     		"showmenu Street"
menuitem "Office"   		"showmenu Office"
menuitem "Computers"		"showmenu Computers"
menuitem "Home"			"showmenu Home"
menuitem "Industrial" 		"showmenu Industrial"
menuitem "Military"		"showmenu Military"
menuitem "Signs"      		"showmenu Signs"
menuitem "Other"      		"showmenu Other"


newmenu "Platforms"

menuitem "Bridge (8x8)"        		"saycommand /newent mapmodel 1 "
menuitem "Platform (8x8)"		"saycommand /newent mapmodel 57 "
menuitem "Wire platform (8x8)"		"saycommand /newent mapmodel 73 "		

newmenu "Ladders/Stairs"

menuitem "Single ladder rung (1)"	"saycommand /newent mapmodel 58 "
menuitem "Ladder(7)"			"newent mapmodel 2"             
menuitem "Ladder(8)"			"newent mapmodel 3"
menuitem "Ladder(10)"			"newent mapmodel 4"
menuitem "Ladder(11)"			"newent mapmodel 5"
menuitem "Ladder(15)"			"newent mapmodel 6"
menuitem "" -1
menuitem "Wire stairs (Top)"		"saycommand /newent mapmodel 79"
menuitem "Wire stairs (Bottom)"		"saycommand /newent mapmodel 80"

newmenu Home

menuitem "Picture frame"      	"saycommand /newent mapmodel 29 "
menuitem "Milk"			"newent mapmodel 69"
menuitem "CRT TV"		"newent mapmodel 86"
menuitem "CRT TV in stand"	"saycommand /newent mapmodel 70 "
menuitem "Plasma TV"		"newent mapmodel 72"
menuitem "Power meter"		"newent mapmodel 74"
menuitem "Rack"			"newent mapmodel 75"
menuitem "Utility table"	"newent mapmodel 87"
menuitem "Ceiling fan"		"saycommand /newent mapmodel 113" 
// The ceiling fan model is repeated in the "office" menu so it's easy to find, as it could be either office or home.
menuitem "Window"		"newent mapmodel 126"
menuitem "Shelf"		"newent mapmodel 128"

newmenu Military

menuitem "Bullet"		"newent mapmodel 61"
menuitem "Shotgun shell"	"newent mapmodel 78"
menuitem "Target"		"newent mapmodel 100"
menuitem "Radar console"	"newent mapmodel 76"
menuitem "Razor wire"		"newent mapmodel 116"
menuitem "Guard tower"		"newent mapmodel 129" [ echo "3This mapmodel will need to be properly clipped!" ]

newmenu Computers

menuitem "Laptop"     			"newent mapmodel 28"
menuitem "PC"				"newent mapmodel 101"
menuitem "Computer interfaces"		"newent mapmodel 65"
menuitem "Communications rack"		"newent mapmodel 63"
menuitem "Communications rack 2"	"newent mapmodel 64"
menuitem "Server rack"			"newent mapmodel 119"
menuitem "Server cluster 1"		[ saycommand "/newent mapmodel 120" ]
menuitem "Server cluster 2"		[ saycommand "/newent mapmodel 121" ]
menuitem "Server cluster 3"		[ saycommand "/newent mapmodel 122" ]
menuitem "Server cluster 4"		[ saycommand "/newent mapmodel 123" ]
menuitem "Server cluster 5"		[ saycommand "/newent mapmodel 124" ]
menuitem "Server cluster 6"		[ saycommand "/newent mapmodel 125" ]

newmenu Street

menuitem "Streetlight"    	"newent mapmodel 7"
menuitem "Park Bench"        	"newent mapmodel 9"
menuitem "Dumpster"    		"newent mapmodel 10"
menuitem "Trashbag"		"newent mapmodel 84"
menuitem "Trashcan"		"newent mapmodel 85"
menuitem "Roadblock/Barrier"   	"newent mapmodel 11"
menuitem "Roadblock/Barrier 2"	"newent mapmodel 12"
menuitem "Drainpipe"		"newent mapmodel 59"
menuitem "Wheel: Vertical"	"newent mapmodel 88"
menuitem "Tyre: Horizontal"	"newent mapmodel 83"
menuitem "Gray milk crate"	"newent mapmodel 112"
menuitem "Red milk crate"	"newent mapmodel 134"
menuitem "Blue milk crate"	"newent mapmodel 135"

newmenu Plants

menuitem "Grass 1"		"newent mapmodel 17"
menuitem "Grass 1 (Dry)"	"newent mapmodel 18"
menuitem "Grass 1 (Snow)"	"newent mapmodel 19"
menuitem "Grass 2"		"newent mapmodel 20"
menuitem "Grass 2 (Dry)"	"newent mapmodel 21"
menuitem "Grass 2 (Snow)"	"newent mapmodel 22"
menuitem "Plant 1"		"newent mapmodel 23"
menuitem "Plant 1 (Dry)"	"newent mapmodel 24"
menuitem "Plant 1 (Snow)"	"newent mapmodel 25"
menuitem "Tree trunk"		"newent mapmodel 130"
menuitem "Tree 1"		"newent mapmodel 114" [ echo "3Trees are expensive mapmodels. Please only use a maximum of 1 or 2 in a map." ]
menuitem "Tree 2"		"newent mapmodel 117" [ echo "3Trees are expensive mapmodels. Please only use a maximum of 1 or 2 in a map." ]
menuitem "Pine tree"		"newent mapmodel 118" [ echo "3Trees are expensive mapmodels. Please only use a maximum of 1 or 2 in a map." ]
menuitem "Palm tree"		"newent mapmodel 115" [ echo "3Trees are expensive mapmodels. Please only use a maximum of 1 or 2 in a map." ]

newmenu Office

menuitem "Office chair"	        	"newent mapmodel 27"
menuitem "Locker"     			"newent mapmodel 30"
menuitem "Air Conditioner (Outer)"	"newent mapmodel 60"
menuitem "Air Conditioner (Inner)"	"newent mapmodel 107"
menuitem "Office desk"			"newent mapmodel 71"
menuitem "Ceiling fan"			"saycommand /newent mapmodel 113"

newmenu Lights

menuitem "Strahler"    		"saycommand /newent mapmodel 31"
menuitem "Fluorescent lamp" 	"saycommand /newent mapmodel 32"
menuitem "LightBulb"   		"saycommand /newent mapmodel 33"
menuitem "Hanging lamp"		"saycommand /newent mapmodel 132"

newmenu Industrial

menuitem "Barrel"          			"newent mapmodel 34"
menuitem "Knocked-over barrel"  		"newent mapmodel 35"
menuitem "Electric meter"			"newent mapmodel 36"
menuitem "Pallette"             		"newent mapmodel 37"
menuitem "Gastank"   				"newent mapmodel 38"
menuitem "Grate (horizontal)"   		"newent mapmodel 39"
menuitem "Grate (vertical)"     		"newent mapmodel 40"
menuitem "Wrench"     				"newent mapmodel 41"
menuitem "Bolt"     				"newent mapmodel 42"
menuitem "Hook"     				"newent mapmodel 52"
menuitem "Cinderblock"				"newent mapmodel 62"
menuitem "Radioactive drum"			"newent mapmodel 81"
menuitem "Knocked-over radioactive drum"	"newent mapmodel 82"
menuitem "Swiveling security camera"		"saycommand /newent mapmodel 77"
menuitem "Camera mount (Vertical)"		"saycommand /newent mapmodel 104"
menuitem "Camera mount (Wall)"			"saycommand /newent mapmodel 105"
menuitem "Large concrete pipe"			"newent mapmodel 108"
menuitem "Medium metal pipe"			"newent mapmodel 109"
menuitem "Small metal pipe"			"newent mapmodel 110"
menuitem "Vent flap"				"newent mapmodel 134"

newmenu Fencing

menuitem "Wire fence"			"newent mapmodel 13"
menuitem "Wire fencepost"		"newent mapmodel 14"
menuitem "Open wire fence-gate"		"newent mapmodel 15" 
menuitem "Closed wire fence-gate"	"newent mapmodel 16"
menuitem "Barbwire fence-top"		"newent mapmodel 127"
menuitem "" -1
menuitem "Corrugated fence"		"newent mapmodel 102"
menuitem "Corrugated fence 2"		"newent mapmodel 103"
menuitem "Corrugated fence post"	"newent mapmodel 66"
menuitem "" -1
menuitem "Guard rail"			"newent mapmodel 67"
menuitem "Guard rail 2"			"newent mapmodel 68"
menuitem "Guard rail pole"		"newent mapmodel 106"


newmenu Signs

menuitem "Flammable"		"saycommand /newent mapmodel 43"
menuitem "Speed Limit 5"	"saycommand /newent mapmodel 44"
menuitem "Maintenance"		"saycommand /newent mapmodel 45"
menuitem "Caution"		"saycommand /newent mapmodel 46"
menuitem "Biohazard"		"saycommand /newent mapmodel 47"
menuitem "Toxic"		"saycommand /newent mapmodel 92"
menuitem "Biohazard (2)"	"saycommand /newent mapmodel 89"
menuitem "Chemicals"		"saycommand /newent mapmodel 90"
menuitem "Confined space"	"saycommand /newent mapmodel 91"
menuitem "Do not enter!"	"saycommand /newent mapmodel 93"
menuitem "Explosives"		"saycommand /newent mapmodel 94"
menuitem "First aid"		"saycommand /newent mapmodel 95"
menuitem "No entry"		"saycommand /newent mapmodel 96"
menuitem "No smoking"		"saycommand /newent mapmodel 97"
menuitem "Radioactive"		"saycommand /newent mapmodel 98"
menuitem "Restricted area"	"saycommand /newent mapmodel 99"
menuitem "Arab"			"saycommand /newent mapmodel 111"
menuitem "Wanted Poster"        "saycommand /newent mapmodel 55"

newmenu Other

menuitem "Cigarette"     	"newent mapmodel 48"
menuitem "Can" 			"newent mapmodel 49"
menuitem "Fallen Can"     	"newent mapmodel 50"
menuitem "Broken Wood"     	"newent mapmodel 51"
menuitem "Coffee"               "newent mapmodel 53"
menuitem "Flyer"                "newent mapmodel 54"
menuitem "Tree Flyer"     	"newent mapmodel 26"
menuitem "Potato box"		"newent mapmodel 56"
menuitem "Cardboard box"	"newent mapmodel 131"


newmenu "Ambient sounds"

menuinit [ alias ambientsoundmenu "" ]
menuitem "Cave drip"				[ alias ambientsoundmenu 0; showmenu "Ambient sound settings" ]
menuitem "Cars driving in the distance"		[ alias ambientsoundmenu 1; showmenu "Ambient sound settings" ]
menuitem "Humm (01)"				[ alias ambientsoundmenu 2; showmenu "Ambient sound settings" ]
menuitem "Humm (02)"				[ alias ambientsoundmenu 3; showmenu "Ambient sound settings" ]
menuitem "Crickets at night"			[ alias ambientsoundmenu 4; showmenu "Ambient sound settings" ]
menuitem "Water (01)"				[ alias ambientsoundmenu 5; showmenu "Ambient sound settings" ]
menuitem "Wind"					[ alias ambientsoundmenu 6; showmenu "Ambient sound settings" ]
menuitem "Air conditioner"			[ alias ambientsoundmenu 7; showmenu "Ambient sound settings" ]
menuitem "Compressor"				[ alias ambientsoundmenu 8; showmenu "Ambient sound settings" ]
menuitem "Crow"					[ alias ambientsoundmenu 9; showmenu "Ambient sound settings" ]
menuitem "Dogs (01)"				[ alias ambientsoundmenu 10; showmenu "Ambient sound settings" ]
menuitem "Helicopter"				[ alias ambientsoundmenu 11; showmenu "Ambient sound settings" ]
menuitem "Humm (03)"				[ alias ambientsoundmenu 12; showmenu "Ambient sound settings" ]
menuitem "Humm (04)"				[ alias ambientsoundmenu 13; showmenu "Ambient sound settings" ]
menuitem "Humm (05)"				[ alias ambientsoundmenu 14; showmenu "Ambient sound settings" ]
menuitem "Humm (06)"				[ alias ambientsoundmenu 15; showmenu "Ambient sound settings" ]
menuitem "Dogs (02)"				[ alias ambientsoundmenu 16; showmenu "Ambient sound settings" ]
menuitem "Night (01)"				[ alias ambientsoundmenu 17; showmenu "Ambient sound settings" ]
menuitem "Night (02)"				[ alias ambientsoundmenu 18; showmenu "Ambient sound settings" ]
menuitem "Radio comms"				[ alias ambientsoundmenu 19; showmenu "Ambient sound settings" ]
menuitem "Radio static"				[ alias ambientsoundmenu 20; showmenu "Ambient sound settings" ]
menuitem "Sat-coms"				[ alias ambientsoundmenu 21; showmenu "Ambient sound settings" ]
menuitem "Sludge"				[ alias ambientsoundmenu 22; showmenu "Ambient sound settings" ]
menuitem "Static (01)"				[ alias ambientsoundmenu 23; showmenu "Ambient sound settings" ]
menuitem "Static (02)"				[ alias ambientsoundmenu 24; showmenu "Ambient sound settings" ]
menuitem "Vent (01)"				[ alias ambientsoundmenu 25; showmenu "Ambient sound settings" ]
menuitem "Vent (02)"				[ alias ambientsoundmenu 26; showmenu "Ambient sound settings" ]
menuitem "Water owl"				[ alias ambientsoundmenu 27; showmenu "Ambient sound settings" ]
menuitem "Water (02)"				[ alias ambientsoundmenu 28; showmenu "Ambient sound settings" ]
menuitem "Water drip"				[ alias ambientsoundmenu 29; showmenu "Ambient sound settings" ]
menuitem "Wind (02)"				[ alias ambientsoundmenu 30; showmenu "Ambient sound settings" ]
menuitem "Waterpipes (01)"			[ alias ambientsoundmenu 31; showmenu "Ambient sound settings" ]
menuitem "Waterpipes (02)"			[ alias ambientsoundmenu 32; showmenu "Ambient sound settings" ]
menuitem "Warning alarm"			[ alias ambientsoundmenu 33; showmenu "Ambient sound settings" ]
menuitem "Gastank"				[ alias ambientsoundmenu 34; showmenu "Ambient sound settings" ]
menuitem "Keyboard"				[ alias ambientsoundmenu 35; showmenu "Ambient sound settings" ]
menuitem "Factory"				[ alias ambientsoundmenu 36; showmenu "Ambient sound settings" ]
menuitem "Vent (03)"				[ alias ambientsoundmenu 37; showmenu "Ambient sound settings" ]
menuitem "Waterfront"				[ alias ambientsoundmenu 38; showmenu "Ambient sound settings" ]
menuitem "Generator"				[ alias ambientsoundmenu 39; showmenu "Ambient sound settings" ]
menuitem "Electric buzz"			[ alias ambientsoundmenu 40; showmenu "Ambient sound settings" ]
menuitem "Alarm"				[ alias ambientsoundmenu 41; showmenu "Ambient sound settings" ]
menuitem "Flies"				[ alias ambientsoundmenu 42; showmenu "Ambient sound settings" ]
menuitem "Desert hawk"				[ alias ambientsoundmenu 43; showmenu "Ambient sound settings" ]
menuitem "Owl"					[ alias ambientsoundmenu 44; showmenu "Ambient sound settings" ]
menuitem "City birds"				[ alias ambientsoundmenu 45; showmenu "Ambient sound settings" ]


alias soundrad 1
alias soundsize 0
alias ambientsoundvol 255

newmenu "Ambient sound settings"
menuinit [ alias soundrad 1; alias soundsize 0; alias ambientsoundvol 255 ]
menuitemslider "Sound radius: " 1 25 "$soundrad" 1 "" "alias soundrad $arg1"
menuitemslider "Sound size: " 0 25 "$soundsize" 1 "" "alias soundsize $arg1"
menuitemslider "Sound volume: " 1 255 "$ambientsoundvol" 5 "" "alias ambientsoundvol $arg1"
menuitem "2		     [ OK ]" "newent sound $ambientsoundmenu $soundrad $soundsize $ambientsoundvol"
