scripting:scriptedosd
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| scripting:scriptedosd [2012/03/23 02:19] – created mit | scripting:scriptedosd [2025/05/28 16:34] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ===== Scripted OSD ===== | + | ===== Scripted OSD Overview |
| + | The ScriptedOSD system allows you to write scripts on your server that can bring up a window on the client, displaying images, text, buttons etc, which the player is able to interact with. | ||
| + | <note tip>One common use for ScriptedOSD is in conjunction with the ' | ||
| + | </ | ||
| + | For details of all the OSD commands and parameters available see the [[scripting: | ||
| - | Temporary notes: | + | ===== ScriptedOSD Example ===== |
| + | |||
| + | Here is an example script that activates a dialog on the client. | ||
| < | < | ||
| - | Event( " | + | Event( " |
| { | { | ||
| - | *soundeffect 18 | + | |
| - | osdcreate(OSDLIST," | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| | | ||
| } | } | ||
| Line 18: | Line 23: | ||
| Event( " | Event( " | ||
| { | { | ||
| - | osdcreate(OSDLIST," | + | *notify %PLAYER% |
| - | | + | |
| - | | + | |
| } | } | ||
| - | Event( "OSDSELECT", " | + | Event( "OSDSelect", " |
| { | { | ||
| - | osdcreate (OSDLIST," | + | *notify %PLAYER% |
| - | | + | |
| - | | + | |
| } | } | ||
| </ | </ | ||
| + | The first block - which is run when a custom event called ' | ||
| + | < | ||
| + | The second parameter of the OSDCreate function ' | ||
| + | </ | ||
| + | Each ' | ||
| - | the first bit of this lays out the initial menu of the OSD for the use of the cigars. the ' | + | If you want to control |
| - | + | e.g. | |
| - | "main" | + | < |
| - | + | | |
| - | Each ' | + | osdaddat(BUTTON, |
| + | osdactivate() | ||
| + | </ | ||
| - | OSDTEXT is to put some text above the buttons (or below, depending on where you lay it in the script) | ||
| - | When the player clicks option1 or option2, it kicks an event trigger. when the event trigger for Main: | ||
scripting/scriptedosd.1332469144.txt.gz · Last modified: (external edit)
