The ultimate object menu. Create a menu that can almost do anything.
Due to the vast amount of options the setup process will most likely be very confusing at first. However ones you understand the basics it becomes easy.
The entire setup is done inside the “_Config (Object Menu PRO)” script. This is great since no one will be able to edit or read your script. The only downside is that one little misplaced , or ” will break the script so its important you pay attention to this.
You can setup a total of 12 main buttons and 12 buttons in each main button making a total of 144 buttons. Do however note that this includes a close and back button.
Basic layout
The basic layout of a settings in the script is as following:
“something : something : something = something”,
There are 3 variants of this setting:
“settings : something = something”,
“integer : something = something”,
“menu : something : something = something”,
Settings
The settings options hold the basic data of your menu. All of them are required.
“settings:creator_access = bd16af9f-8cbe-49f6-86e8-5de050ee7b8c”,
“settings:menu_text = This text can be changed in the _config script.”,
“settings:menu_access = owner”,
“settings:menu_timeout = 300”,
“settings:close_button = CLOSE”,
“settings:back_button = < BACK”,
“settings:re_menu = on”,
“settings:link_other = off”,
“settings:click_menu = on”,
You only change the data after the =.
Make sure not to remove the “, at the end of the line as this will break the script.
Main Menu
The main menu is the menu you get when you click the object.
“menu:main:menu = button1, button2, button3”,
Your menu may consist of up to 12 buttons. Inside your main menu you may also want to include the CLOSE button as defined by settings:close_button.
“menu:main:menu = button1, button2, CLOSE, button3, button4, Light”,
For a button to do something you need to define a action or sub menu:
“menu:main:Light = something”,
This is a action. When the Light button is clicked “something” is done.
“menu:Light:menu = button1 ,button2”,
This is a sub menu. When the light button is clicked it gives a sub menu with button1 and button2.
(Note: a BACK button is automatically included in all sub menus. The sub menu can contain up to 11 buttons)
“menu:Light:button1 = something”,
This is a action for the sub menu for when button1 is clicked.
Integers
The integer options holds a on or off value that you can use inside of your blue dialog menu and there values can be changed by menu buttons.
If you for example would create a lamp:
“integer:light = off”,
When we rez the lamp the light is off. So we set the integer to Off, which is the default.
This setting will automatically create the [light] tag that we can use in our menu text.
“menu:light:menu = On, Off”,
“menu:light:text = Light: [light]”,
Create a sub menu with a On and Off button and the light status in the menu text.
“menu:light:on = light | -4 | 1 | <0.8, 0.4, 0.0> | 1.0 | 5.0 | 1.0”,
“menu:light:on = integer | on”,
Set the light to on and change the integer to on.
“menu:light:off = light | -4 | 0 | <0.8, 0.4, 0.0> | 1.0 | 5.0 | 1.0”,
“menu:light:off = integer | off”,
Set the light to off and change the integer to off.
Prim numbers & names
All menu buttons that let you specify a prim supports either a prim number or prim name.
It is recommended that you use a prim name or negative link number when possible (so when you re-link your item you don’t need to change the numbers).
menu:color:red = color | 2 | <1.000, 0.255, 0.212> | -1
Change the prim with link number 2 to red.
menu:color:red = color | a1 | <1.000, 0.255, 0.212> | -1
Change the prim with the name a1 to red.
Negative link numbers are also supported:
-1 = All prims.
-2 = All other prims.
-3 = All children (all except root).
-4 = The prim the script is in.
For faces you can either use the face number or -1 for all faces.
Examples
There are multiple examples included with the Object Menu PRO. You want to rez and edit these examples to see how they work. They make it a lot easier to understand.
Here is the example of a simple lamp (the “light prim” is named a1):
“integer:main = off”,
“menu:main:menu = On, Off, CLOSE”,
“menu:main:On = glow | a1 | -1 | 0.1”,
“menu:main:On = light | a1 | 1 | <0.8, 0.4, 0.0> | 1.0 | 5.0 | 1.0”,
“menu:main:On = integer | on”,
“menu:main:Off = glow | a1 | -1 | 0.0”,
“menu:main:Off = light | a1 | 0 | <0.8, 0.4, 0.0> | 1.0 | 5.0 | 1.0”,
“menu:main:Off = integer | off”
Menu buttons
As previously explained a “main menu button” can either do something or open a sub menu.
Bellow a list of the button options with examples:
Access
Set who can access the menu.
Format: access | owner/group/everyone
Example:
“menu:main:menu = Button1, Button2, CLOSE, Access“,
“menu:Access:menu = Owner, Group, Everyone”,
“menu:Access:text = Menu Access: [access]”,
“menu:Access:Owner = access | owner”,
“menu:Access:Group = access | group”,
“menu:Access:Everyone = access | everyone”
Scale
Change the size of the entire object.
Format: scale | float
Example:
“menu:main:menu = Button1, Button2, CLOSE, Size“,
“menu:Size:menu = +, -“,
“menu:Size:+ = scale | 1.02″,
“menu:Size:- = scale | 0.98″
Size
Change the size of a prim.
Format: size | prim | vector
Example:
“menu:main:menu = Button1, Button2, CLOSE, Size“,
“menu:Size:menu = 0.5m, 1m”,“menu:Size:0.5m = size | -4 | <0.5,0.5,0.5>”,
“menu:Size:1m = size | -4 | <1.0,1.0,1.0>”
Texture
Change the texture of a prim.
Format: texture | prim | texture_uuid | face
Example:
“menu:main:menu = Button1, Button2, CLOSE, Texture“,
“menu:Texture:menu = 1, 2″,
“menu:Texture:1 = texture | -4 | 4d1d5bad-a409-c5e6-f156-7b488c770588 | -1″,
“menu:Texture:2 = texture | -4 | b6d12b65-b088-ed92-9a1c-8a1818b9d7df | -1″
Texture+
The same as above just with more options.
Format: texture+ | prim | face | texture_uuid | repeats | offset | rotation
Example:
“menu:main:menu = Button1, Button2, CLOSE, Texture“,
“menu:Texture:menu = 1+, 2+”,“menu:Texture:1+ = texture+ | -4 | -1 | 4d1d5bad-a409-c5e6-f156-7b488c770588 | <1,1,0> | <0,0,0> | 45″,
“menu:Texture:2+ = texture+ | -4 | -1 | b6d12b65-b088-ed92-9a1c-8a1818b9d7df | <1,1,0> | <0,0,0> | 90″
Alpha
Change the alpha of a prim.
Format: alpha | prim | float | face
Example:
“menu:main:menu = Button1, Button2, CLOSE, Alpha“,
“menu:Alpha:menu = 50%, 100%, 0%”,
“menu:Alpha:100% = alpha | -4 | 0.0 | -1″,
“menu:Alpha:50% = alpha | -4 | 0.5 | -1″,
“menu:Alpha:0% = alpha | -4 | 1.0 | -1″
Color
Change the color of a prim.
Format: color | prim | vector | face
Example:
“menu:main:menu = Button1, Button2, CLOSE, Color“,
“menu:Color:menu = Red, Green”,
“menu:Color:Red = color | -4 | <1.000, 0.255, 0.212> | -1″,
“menu:Color:Green = color | -4 | <0.180, 0.800, 0.251> | -1″
Rotation
Make the object rotate.
Format: rotate | vector | speed
Example:
“menu:main:menu = Button1, Button2, CLOSE, Rotate“,
“menu:Rotate:menu = On, Off”,
“menu:Rotate:On = rotate | <0.0,0.0,1.0> | 2.0″,
“menu:Rotate:Off = rotate | <0.0,0.0,1.0> | 0.0″
Glow
Change the glow of a prim.
Format: glow | prim | face | float
Example:
“menu:main:menu = Button1, Button2, CLOSE, Glow“,
“menu:Glow:menu = On, Off”,
“menu:Glow:On = glow | -4 | -1 | 0.2″,
“menu:Glow:Off = glow | -4 | -1 | 0.0″
Bright
Change the full bright of a prim.
Format: bright | prim | face | 1/0 (on/off)
Example:
“menu:main:menu = Button1, Button2, CLOSE, Full Bright“,
“menu:Full Bright:menu = On, Off”,
“menu:Full Bright:On = bright | -4 | -1 | 1″,
“menu:Full Bright:Off = bright | -4 | -1 | 0″
Light
Set light on a prim.
Format: light | prim | 1/0 (on/off) | color | intensity | radius | falloff
Example:
“menu:main:menu = Button1, Button2, CLOSE, Light“,
“integer:Light = off”,
“menu:Light:menu = On, Off”,
“menu:Light:text = Light: [Light]”,
“menu:Light:On = light | -4 | 1 | <0.8, 0.4, 0.0> | 1.0 | 5.0 | 1.0″,
“menu:Light:On = integer | on”,
“menu:Light:Off = light | -4 | 0 | <0.8, 0.4, 0.0> | 1.0 | 5.0 | 1.0″,
“menu:Light:Off = integer | off”
Integer
Set a value to on or off.
Format: integer | on/off
See the Light example above.
Animations
Set a texture animation on a prim.
Format: anim | prim | face | sizex | sizey | start | lenght | rate
Format: animrot | prim | face | sizex | sizey | start | lenght | rate
Format: animscale | prim | face | sizex | sizey | start | lenght | rate
Format: anim | prim | FALSE (turn off animation)
Example:
“menu:main:menu = Button1, Button2, CLOSE, Animation“,
“menu:Animation:menu = Slide, Rotate, Scale, Off”,
“menu:Animation:Slide = anim | -4 | -1 | 1 | 1 | 1.0 | 1.0 | 0.015″,
“menu:Animation:Off = anim | -4 | FALSE”,
“menu:Animation:Rotate = animrot | -4 | -1 | 1 | 1 | 1.0 | 1.0 | -1.0″,
“menu:Animation:Scale = animscale | -4 | -1 | 1 | 1 | 1.0 | 1.0 | -1.0″
Link
Send a link message (to a other script).
Format: link | num | str
Example:
“menu:main:menu = Button1, Button2, CLOSE, Link“,
“menu:main:Link= link | 1234 | blabla”
Kill
Delete the scripts or everything in the contents of the prim.
Format: kill | 1/0 (yes/no) | all/script
Example:
“menu:main:menu = Button1, Button2, CLOSE, Delete Script“,
“menu:Delete Script:menu = Yes, No”,
“menu:Delete Script:text = Are you sure you want to delete the script?”,
“menu:Delete Script:Yes = kill | 1 | script”,
“menu:Delete Script:No = kill | 0 | script”
Link messages
Apart from being able to send link messages using the link button option the Object Menu PRO can also receive link messages from other scripts. This can be used to open the menu from a other script.
Example:
llMessageLinked(LINK_THIS, 692580302, “main:menu”, llGetOwner());
Note that a link message can also open a sub menu. Example:
llMessageLinked(LINK_THIS, 692580302, “color:menu”, llGetOwner());
In order for the script to accept link messages you need to set the following setting to on:
“settings:link_other = on”,
If you want to fully control the menu from a other script you can also disable the menu from coming up when you click the object by setting the following setting to off:
“settings:click_menu = off”,