# Event-System Event

# Game Event managementEvents

Simply add events that need to be monitored without creating event object, example as below:

--Game Event---
ScriptSupportEvent:registerEvent([=[Game.Start]=], Game_StartGame)
ScriptSupportEvent:registerEvent([=[Game.Run]=], Game_Update)
ScriptSupportEvent:registerEvent([=[Game.End]=], Game_GameOver)
--Player Event---
ScriptSupportEvent:registerEvent([=[Player.Die]=], Player_Dead)
ScriptSupportEvent:registerEvent([=[Player.Revive]=], Player_Revive)
ScriptSupportEvent:registerEvent([=[Player.AddItem]=], BackPack_AddItem)
--Block Event---
ScriptSupportEvent:registerEvent_Block([=[Block.Add]=], Block_Add)
ScriptSupportEvent:registerEvent_Block([=[Block.DestroyBy]=], Block_Destroy)
ScriptSupportEvent:registerEvent_Block([=[Block.Trigger]=], Block_Trigger)

# Game Event Type and Description

No. Event Type Description
1 World Event Relevant events in map
2 Logic Event Game logic related events
3 Player Event Player related events
4 Creature Event Creature related events
5 Block Event Block related events
6 Item Event Item related events
7 Particle Event Particle related events

# World Event (World)

Name Description Params
Weather.Changed Change of weather None
Backpack.ItemChange Change of backpack bar {blockid, x, y, z, itemid, itemnum}

# Logic Event (Game)

Name Description Params
Game.AnyPlayer.Defeat Any player is defeated {eventobjid, toobjid}
Game.AnyPlayer.EnterGame Any player enters game {eventobjid, toobjid}
Game.AnyPlayer.LeaveGame Any player leaves game {eventobjid, toobjid}
Game.AnyPlayer.ReadStage Any player loads game None
Game.AnyPlayer.Victory Any player wins {eventobjid, toobjid}
Game.End Game over None
Game.Hour World time is [n] {hour}
Game.Load Start game None
Game.Run Game is running None
Game.RunTime World time is [n] second {second}
Game.Start Game start None
Game.TimeOver Game timeout None
minitimer.change Any change of Timer {timerid, timername}1.1+

# Player Event (Player)

Name Description Params
Player.AddItem Add new item {eventobjid, toobjid, itemid, itemnum}
Player.AreaIn Player enters area {eventobjid, areaid}
Player.AreaOut Player leaves area {eventobjid, areaid}
Player.Attack Player attacking {eventobjid, toobjid}
Player.AttackHit Player attack hits {eventobjid, toobjid}
Player.BackPackChange Change of backpack bar {eventobjid, toobjid, itemid, itemnum}
Player.BeHurt Player take damage {eventobjid, toobjid}
Player.ChangeAttr Change of attribute {eventobjid, playerattr}
Player.ClickActor Click on creation {eventobjid, toobjid}
Player.ClickBlock Click on block {eventobjid, blockid, x, y, z}
Player.Collide Collide with other player {eventobjid, toobjid}
Player.ConsumeItem Consume item {eventobjid, toobjid, itemid, itemnum}
Player.DamageActor Deals damage to other player {eventobjid, toobjid}
Player.DefeatActor Defeat object {eventobjid, toobjid}
Player.Die Player die {eventobjid, toobjid}
Player.DiscardItem Discard item {eventobjid, toobjid, itemid, itemnum}1.1+
Player.DismountActor Cancel riding mount {eventobjid, toobjid}
Player.EquipChange Change of armor bar {eventobjid, toobjid, itemid, itemnum}
Player.EquipOff Unequip armor {eventobjid, toobjid, itemid, itemnum}1.1+
Player.EquipOn Equip armor {eventobjid, toobjid, itemid, itemnum}1.1+
Player.Init Player is restored {eventobjid, toobjid}
Player.InputContent Enter text string {eventobjid, content}1.1+
Player.JoinTeam Join team {eventobjid, toobjid}
Player.MotionStateChange Change motion state {eventobjid, playermotion}
Player.MountActor Ride mount/vehicles {eventobjid, toobjid}
Player.MoveOneBlockSize Move one block {eventobjid, toobjid}
Player.PickUpItem Pick up drop item {eventobjid, toobjid, itemid, itemnum}
Player.PlayAction Change of expression {eventobjid, act}
Player.Revive Player respawn {eventobjid, toobjid}
Player.SelectShortcut Make selection on shortcut bar {eventobjid, toobjid, itemid, itemnum}
Player.ShortcutChange Change of shortcut bar {eventobjid, toobjid, itemid, itemnum}
Player.UseItem Use item {eventobjid, toobjid, itemid, itemnum}

# Creature Event (Actor)

Name Description Params
Actor.AreaIn Creature enters area {eventobjid, areaid}
Actor.AreaOut Creature leaves area {eventobjid, areaid}
Actor.Attack Creature attacking {eventobjid, toobjid}
Actor.AttackHit Creature attack hits {eventobjid, toobjid}
Actor.BeHurt Creature take damage {eventobjid, toobjid}
Actor.Beat Creature defeat other player/creature {eventobjid, toobjid}
Actor.ChangeAttr Change of attribute {eventobjid, actorattr}
Actor.ChangeMotion Creature change motion state {eventobjid, actormotion}
Actor.Collide Collide with other player or creature {eventobjid, toobjid}
Actor.Create Creature is created {eventobjid, toobjid}
Actor.Damage Deals damage to others {eventobjid, toobjid}
Actor.Die Creature die {eventobjid, toobjid}
Actor.Projectile.Hit Smashed by projectile {eventobjid, toobjid(opt), blockid(opt), x, y, z}

# Block Event (Block)

Name Description Params
Block.Add Block is created {blockid, x, y, z}
Block.DestroyBy Block is destoryed {eventobjid(opt), blockid, x, y, z}
Block.Dig.Begin Start mining block {eventobjid, blockid, x, y, z}
Block.Dig.Cancel Cancel mining block {eventobjid, blockid, x, y, z}
Block.Dig.End Complete mining block {eventobjid, blockid, x, y, z}
Block.Fertilize Block being fertilized {eventobjid, blockid, x, y, z}
Block.PlaceBy Block being placed {eventobjid, blockid, x, y, z}
Block.Remove Block being removed {blockid, x, y, z}
Block.Trigger Block being triggered {eventobjid, blockid, x, y, z}

# Item Event (Item)

Name Description Params
DropItem.AreaIn Drop item enters area {eventobjid, areaid, itemid(opt), itemnum(opt)}
DropItem.AreaOut Drop item leaves area {eventobjid, areaid, itemid(opt), itemnum(opt)}
Item.Disappear Item disappear {eventobjid, toobjid, itemid, itemnum}
Item.Pickup Item is picked up {eventobjid, toobjid, itemid, itemnum}
Missile.AreaIn Projectile enters area {eventobjid, areaid, itemid(opt), itemnum(opt)}
Missile.AreaOut Projectile leaves area {eventobjid, areaid, itemid(opt), itemnum(opt)}
Missile.Create Projectile is created {eventobjid, toobjid, itemid, x, y, z}1.2+

# Particle Event (Particle)

Name Description Params
Particle.Mob.OnCreate Special effects have been created on any creatures {eventobjid, effectid}1.2+
Particle.Player.OnCreate Special effects have been created on any players {eventobjid, effectid}1.2+
Particle.Pos.OnCreate Special effects have been created on any location {x, y, z, effectid}1.2+
Particle.Projectile.OnCreate Special effects have been created for any projectile {eventobjid, effectid}1.2+
Last Update: 12/5/2019, 8:54:33 PM