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:35] 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 ==== ==== ViewTournament ====
 ==== ActivateGuide ==== ==== ActivateGuide ====
Line 200: Line 211:
 ==== CrowExit ====  ==== CrowExit ==== 
 ==== Subgame ====  ==== Subgame ==== 
-==== SubgameChallengeStart ==== +==== SubgameDuelStart ==== 
-==== SubgameChallengeCountdownStart ====+==== SubgameDuelCountdownStart ====
 ==== RaceStart ==== ==== RaceStart ====
 ==== RaceEnd ==== ==== RaceEnd ====
Line 214: Line 225:
 ==== DayOfYear ==== ==== DayOfYear ====
 ==== OnTheHour ==== ==== 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 ==== ==== TenToTheHour ====
 ==== FiveToTheHour ==== ==== FiveToTheHour ====
scripting/reference/events_reference.1580823347.txt.gz · Last modified: 2020/02/04 07:35 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