User Tools

Site Tools


scripting:reference:events_reference

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
scripting:reference:events_reference [2020/02/04 07:07] mitscripting:reference:events_reference [2023/08/23 16:45] (current) – [MenuOption] mit
Line 70: Line 70:
 ^ | **12** = Pub custom button 5| ^ | **12** = Pub custom button 5|
 ^ CancelTransaction | N/A | ^ CancelTransaction | N/A |
-^ Notes | Most of these events won't appear until you've first set up the particular custom menu option or other settings. |+^ Notes | Most of these events won't appear until you've first set up the particular custom menu option or other settings. (e.g. You must use *scriptedoption 18,[BUTTON_TEXT] to activate the 'Info screen custom button 1'. See the [[scripting:reference:scriptingmainui|scripting main ui doc]] for a full list of configurable options and interfaces.) |
 //Example// //Example//
 <code>Event( "MenuOption", "1" ) <code>Event( "MenuOption", "1" )
Line 86: Line 86:
 { {
     osdcreate(OSDLOWER,"SwordOSD", "- Bronze Sword -" )      osdcreate(OSDLOWER,"SwordOSD", "- Bronze Sword -" ) 
-    osdaddat(TEXT, 0, 0, 600, 80, "", "The Bronze Sword is a basic weapon, +4 dmg, occupies 1 inventory slot etc." )+    osdadd(TEXT, 0, 0, 600, 80, "", "The Bronze Sword is a basic weapon, +4 dmg, occupies 1 inventory slot etc." )
     osdactivate()     osdactivate()
 } }
Line 92: Line 92:
  
 ==== MapClick ==== ==== MapClick ====
 +^ Triggered by | The player clicking on a tile on the landscape when they're in a vehicle using **Control Mode** = 34. This is an experimental mode, probably requiring further development, that is intended to let you build scripted games using a different control methodology. |
 +^ Event Parameter | None |
 +^ CancelTransaction | N/A |
 +//Example//
 +<code>Event( "MapClick", "" )
 +{
 +    $mapX = $gClickX
 +    $mapY = $gClickY
 +    *msg %PLAYER% You clicked on tile $mapX, $mapY
 +}
 +</code>
 +==== ViewTournament ====
 +==== ActivateGuide ====
  
 ===== Inventory & Skill Events ===== ===== Inventory & Skill Events =====
Line 198: Line 211:
 ==== CrowExit ====  ==== CrowExit ==== 
 ==== Subgame ====  ==== Subgame ==== 
-==== SubgameChallengeStart ==== +==== SubgameDuelStart ==== 
-==== SubgameChallengeCountdownStart ==== +==== SubgameDuelCountdownStart ====
 ==== RaceStart ==== ==== RaceStart ====
 ==== RaceEnd ==== ==== RaceEnd ====
Line 207: Line 219:
 ==== FlagCapture ==== ==== FlagCapture ====
 ==== HornballGoal ==== ==== HornballGoal ====
 +==== EnterGameZone ====
 +==== ExitGameZone ====
 +
 +===== Timed Events =====
 +==== DayOfYear ====
 +==== OnTheHour ====
 +^ Triggered by | Realtime clock reaching the hour |
 +^ Event Parameter | None |
 +^ CancelTransaction | N/A |
 +//Example//
 +<code>Event( "OnTheHour", "" )
 +{
 +    $numBongs = sysRealTime("Hour")
 +    if ( $numBongs > 12 )
 +    {
 +        $numBongs -= 12
 +    }
 +    $loop = 0
 +    while ( $loop < $numBongs )
 +    {
 +        *customsoundall 1
 +       Sleep(10)
 +       $loop += 1
 +    }
 +}
 +</code>
 +==== TenToTheHour ====
 +==== FiveToTheHour ====
 +==== WorldUpdate ====
 +^ Triggered by | Regular time interval specified in seconds in ***settings** -> **World** -> **Script Empty WorldUpdate Timer** or **Script WorldUpdate Timer** ; The 'Empty' value is used when there are no players on the world. If the settings value is 0 the timer is not called. |
 +^ Event Parameter | None |
 +^ CancelTransaction | N/A |
  
 ===== Special Server Events ===== ===== Special Server Events =====
Line 215: Line 259:
 ==== &command ==== ==== &command ====
 ==== Timer ==== ==== Timer ====
-==== OnTheHour ==== 
-==== TenToTheHour ==== 
-==== FiveToTheHour ==== 
 ==== ScriptReload ==== ==== ScriptReload ====
 ==== RangeLeave ==== ==== RangeLeave ====
Line 232: Line 273:
 } }
 </code> </code>
-==== WorldUpdate ==== 
 ==== BongoChant ==== ==== BongoChant ====
  
scripting/reference/events_reference.1580821659.txt.gz · Last modified: 2020/02/04 07:07 by mit

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki