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

Next revision
Previous revision
scripting:reference:events_reference [2020/01/28 17:50] – external edit 127.0.0.1scripting: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()
 } }
 </code> </code>
 +
 +==== 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 =====
 ==== UseItem ==== ==== UseItem ====
Line 188: Line 204:
 ==== PickupBuilding ==== ==== PickupBuilding ====
 ==== BuildingDamaged ==== ==== BuildingDamaged ====
 +
 +===== Minigame Events =====
 +==== ActivateRC ====
 +==== CrowFlagTouch ==== 
 +==== CrowFlagTouchAny ==== 
 +==== CrowExit ==== 
 +==== Subgame ==== 
 +==== SubgameDuelStart ====
 +==== SubgameDuelCountdownStart ====
 +==== RaceStart ====
 +==== RaceEnd ====
 +==== RaceWinner ====
 +==== FlagPickup ====
 +==== FlagCapture ====
 +==== 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 200: Line 263:
 ==== SeaDepth ==== ==== SeaDepth ====
 ==== KillWildlife ==== ==== KillWildlife ====
-==== WorldUpdate ====+^ Triggered by | A player killing wildlife | 
 +^ Event Parameter | The type of the wildlife (Defaults to 0) | 
 +^ CancelTransaction | N/A | 
 +//Example// 
 +<code>Event( "KillWildlife", "0"
 +
 +    *say %PLAYER% called a sheep 
 +    *grantitem %PLAYER% 1 Wool 
 +
 +</code> 
 +==== BongoChant ====
  
 ===== Entity Events ===== ===== Entity Events =====
Line 206: Line 279:
 ==== EntityDamaged ==== ==== EntityDamaged ====
 ==== EntityUpdate ==== ==== EntityUpdate ====
 +==== EntityPickup ====
  
 ===== Town Events ===== ===== Town Events =====
scripting/reference/events_reference.1580255412.txt.gz · Last modified: 2020/01/28 17:50 by 127.0.0.1

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