Scripting Features

  • Search existing ideas before submitting
  • Use support.secondlife.com for customer support issues
  • Keep posts on-topic
Thank you for your ideas!
Adding more control() inputs: game_control() without a game controller
The provisioned features and power of the game_control() event are impressive, and miles ahead of the support available to scripters for processing input events for standard keyboard+mouse usage. Currently there's no way to respond to other mouse buttons (scroll wheel, middle click, right click, shoulder buttons) and there are no vectors for user input aside from the standard movement keys. Thus if someone wants to make a game for users without a controller, they're limited to the interactivity of Quake 1, which is notable as being an aggressively minimalist design (shoot only, all doors open automatically) that was largely abandoned by other games. For SL to really work as a game environment, we need a way to bind a "use" key, or keys for reloading weapons, or for using special powers like a quick melee attack. I'd like to propose the following: - Adding 6 new mouse button bits to control(): scroll up, scroll down, mouse 2 (right), mouse 3 (middle), mouse 4 (shoulder 1), mouse 5 (shoulder 2) - Adding 4 new general-purpose control inputs to control(): action 1, action 2, action 3, action 4 - Adding the general-purpose action inputs to Preferences › Controls - Allow all control() bits to be mapped to controller buttons so vehicles without game_control() can be used with controllers and receive all the benefits of these new features — though this could/should be a feature request on its own The bitmasks for level and edge have plenty of room for these 10 new bits, so I don't think this is too crazy a request.
2
·

tracked

Feature request: Function llCustomDialog()
The function llCustomDialog works similar to llDialog function but allows creating more modern and fancy dialogs. key llCustomDialog(key avatar, string message, list buttons, integer channel, list options); The return value is not used at time. It can be used in future to identify open dialogs (and for example to let the viewer close it). The options parameter allows the scripter to control rendering and behavior of the dialog. I organized it in 3 categories. 1. Dialog symbol options A dialog symbol is a large symbol shown at the side of the text. The actual position and size of this symbol is up to the viewer. This option defines static dialog symbol: [CUSTOM_DIALOG_TYPE, key symbol] The symbol parameter is a key of the image to show as the dialog symbol. Additionally we can define key constants using pre-defined dialog symbols: CUSTOM_DIALOG_TYPE_CONFIRMATION, _INFORMATION, _ERROR, _WARNING, _OPEN, _TRANSFER. The types OPEN and TRANSFER are used to confirm opening of product boxes or transferring items to someone else (usual operations for vendors and product boxes). To animate a user-defined dialog symbol we use this option block: [CUSTOM_DIALOG_TYPE_ANIM, integer mode, integer sizex, integer sizey, float start, float length, float rate] The parameters are quite similar to the llSetTextureAnim so that we not need to describe them. When no CUSTOM_DIALOG_TYPE option is set, the dialog will show no symbol. When a predefined dialog symbol is used, the animation option is ignored. 2. Tab-stop option When I create dialogs I mostly want to provide some information and I'd like to make it look like a table. This option aims to acheive this: [CUSTOM_DIALOG_COLUMNS, string columns, integer softbreaks] The parameter columns is a comma-separated string of column definitions, as "<size><alignment><margin>". The size and margin are given either in pixels or in ratio to the size of the text area. When size is omitted, it dynamically adaptes to fit the content. The alignment is one of 'L', 'C', 'R' and is mandatory. Example: [CUSTOM_DIALOG_COLUMNS, "50 L, 0.75 L 5, C", FALSE] Here we define three columns and forbid softbreaks. How the dialog renders the text? When a text line contains "\t" characters, these segmentate the text line into columns. When a text segment is too large for staticly defined column, it continues in the next column. When softbreaks parameter is TRUE, a text segment which is too large for a column is broken in lines which remains in the same column. When softbreaks is FALSE, the dialog shows a horizontal scroll bar when the text is too wide. 3. Metaoptions These options define the behavior of the dialog and it's lifetime. [CUSTOM_DIALOG_LIFE, integer time] When time is positive, the viewer should clean the dialog away after the given time. The viewer may display the remaining time in the dialog window to warn the user. [CUSTOM_DIALOG_REPLACE, string response] When a dialog is replaced by an other dialog sent from the same device then the viewer should send the response string on the dialog channel to report this. [CUSTOM_DIALOG_IGNORE_BUTTON, integer hide, string response] This option allows to handle the ignore button. When hide = TRUE, then the ignore button is hidden, the response parameter is then ignored. When hide = FALSE, then the response parameter defines a string to be sent when the user presses the ignore button. This option allows scripts to recognize pressing of the ignore button or hide it when it uses a menu button for same purpose. 4. Button symbols This part is controlled by button names. The Idea: I'd like to show certain symbols together with the buttons text. Like this: "🔧 settings". One can do this by using Unicode characters in the button text but I'd suggest to define the symbols logically: The button name should start with the symbol enclosed into curly bracket: "{symbol}button name" The symbol name can be a Unicode character, e.g. "{🔧}settings", Texture key to use, Logical symbol name, e.g. "{CONFIG}settings". It is up to the viewer to choose the symbol, its size, position, and the distance to the button text. Note: When a button is pressed, the viewer will only send the button name but exclude the symbol definition. For example when button "{CONFIG}settings" is pressed, only "settings" is sent. This enforces the scripters to use button names the user will recognize even if the viewer not knows how to show the button symbols. Following symbol names should be defined: OK, CANCEL, ABORT, STOP, YES, NO, IGNORE, UNDO, REDO, RETRY, HELP, INFO, OPTIONS, CONFIG, WHITELIST, BLACKLIST, CLOSE, EXIT. The symbol names are strings, only known to the viewer. The server will not parse the button names for them. This list can be extended in future.
5
·

tracked

Load More