Legacy Reference

Game Rules Script Callbacks

CryLua is deprecated and will be removed in a future version of Lumberyard.

This topic provides reference information on callbacks used with the GameRules scripts.

Callback Function Description

Called when a player is added as a tagged player on the minimap. Called on the server only.

  • shooterId – Entity that tagged the target player.

  • targetId – Tagged player.


Called when a player connects. Called on the server only.

  • channelId


Called when a player disconnects. Called on the server only.

  • channelId


Called when a player enters the game and is part of the game world. Called on the server only.

  • channelId – Channel identifier of the player.

  • playerScriptTable – The player's script table.

  • bReset – Boolean indicating whether or not the channel is from the reset list.

  • bLoadingSaveGame – Boolean indicating whether or not the call was made during a saved game loading.


Called when the player disconnects on the client. Called on the client only.

  • cause – Integer identifying the disconnection cause. See EDisconnectionCause.

  • description – Human readable description of the disconnection cause.


Called when a player changes the spectator mode. Called on the server only.

  • entityId – Player who made the change.

  • mode – New spectator mode (1=fixed, 2=free, 3= follow).

  • targetId – Possible target entity to spectate.

  • resetAll – Boolean indicating whether or not to reset player-related things like the inventory.


Called when a player switches teams. Called on the server only.

  • entityId – Player who switched teams.

  • teamId – New team identifier.


Called when an explosion is simulated. Called on the server and client.

  • pos – Position of the explosion in the game world.

  • dir – Direction of the explosion.

  • shooterId

  • weaponId

  • shooter

  • weapon

  • materialId

  • damage

  • min_radius

  • radius

  • pressure

  • hole_size

  • effect

  • effectScale

  • effectClass

  • typeId

  • type

  • angle

  • impact

  • impact_velocity

  • impact_normal

  • impact_targetId

  • shakeMinR

  • shakeMaxR

  • shakeScale

  • shakeRnd

  • impact

  • impact_velocity

  • impact_normal

  • impact_targetId

  • AffectedEntities – Affected entities table.

  • AffectedEntitiesObstruction – Affected entities obstruction table.