Bitfighter
021
The Bitfighter Lua Documentation - Robots, Levelgens, and Plugins
|
The Event enum represents different events that the game fires that scripts might want to respond to. Below are the signatures of methods you can implement to respond to these events. Note that you will also have to subscribe to the event to be notified of it.
See the subscribe methods for bots and levelgens, and the Events section of the scripting overview page.
Event.Tick
onTick()
Event.ShipSpawned
onShipSpawned(Ship ship)
Event.ShipKilled
onShipKilled(BfObject shooter)
Event.PlayerJoined
onPlayerJoined(PlayerInfo player)
Event.PlayerLeft
onPlayerLeft(PlayerInfo player)
Event.PlayerTeamChanged
onPlayerTeamChanged(PlayerInfo player)
Event.MsgReceived
onMsgReceived(bool messageIsGlobal)
Event.NexusOpened
onNexusOpened()
Event.NexusClosed
onNexusClosed()
Event.ShipEnteredZone
onShipEnteredZone(Zone zone)
Event.ShipLeftZone
onShipLeftZone(Zone zone)
Event.ObjectEnteredZone
onObjectEnteredZone(Zone zone)
Event.ObjectLeftZone
onObjectLeftZone(Zone zone)
Event.ScoreChanged
onScoreChanged(PlayerInfo player)
Event.GameOver
onGameOver()
Event.CoreDestroyed
onCoreDestroyed(CoreItem core)