Jump to content

EVENT scripts: Difference between revisions

125 bytes removed ,  12 December 2021
3.1 is released, so Devfeature templates have been removed
(Added information about handling certain event types.)
(3.1 is released, so Devfeature templates have been removed)
Line 22: Line 22:
;GAMEEVENT_ROUND_ABORTED 7
;GAMEEVENT_ROUND_ABORTED 7
:If the round is aborted (e.g. in duel where one of the combatants leaves the game).
:If the round is aborted (e.g. in duel where one of the combatants leaves the game).
;GAMEEVENT_CHAT 8 {{Devfeature|3.1|alpha}}
;GAMEEVENT_CHAT 8
:When a chat message is sent. The activator is always the world, <tt>arg1</tt> is the number of the player who sent the message (if the server sent the message, -1 is passed instead), and <tt>arg2</tt> is set to 0 if it was a global chat message or 1 if it was a team chat message.
:When a chat message is sent. The activator is always the world, <tt>arg1</tt> is the number of the player who sent the message (if the server sent the message, -1 is passed instead), and <tt>arg2</tt> is set to 0 if it was a global chat message or 1 if it was a team chat message.
;GAMEEVENT_PLAYERCONNECT 9 {{Devfeature|3.1|alpha}}
;GAMEEVENT_PLAYERCONNECT 9
:A client or bot connects to the server. The activator is the world, <tt>arg1</tt> is the number of the player, and <tt>arg2</tt> is set to 1 if the client had previously joined the server or 0 if not.
:A client or bot connects to the server. The activator is the world, <tt>arg1</tt> is the number of the player, and <tt>arg2</tt> is set to 1 if the client had previously joined the server or 0 if not.
;GAMEEVENT_ACTOR_SPAWNED 10 {{Devfeature|3.1|alpha}}
;GAMEEVENT_ACTOR_SPAWNED 10
:When an non-player actor is spawned. Strictly speaking, this occurs just before the actor's first tic. The activator is the actor that spawned.
:When an non-player actor is spawned. Strictly speaking, this occurs just before the actor's first tic. The activator is the actor that spawned.
;GAMEEVENT_ACTOR_DAMAGED 11 {{Devfeature|3.1|alpha}}
;GAMEEVENT_ACTOR_DAMAGED 11
:When an actor is just about to take damage, after all damage modifications are applied. The activator is the actor taking damage, <tt>arg1</tt> is the amount of damage received, and <tt>arg2</tt> is a dynamic ACS string containing the damage type.
:When an actor is just about to take damage, after all damage modifications are applied. The activator is the actor taking damage, <tt>arg1</tt> is the amount of damage received, and <tt>arg2</tt> is a dynamic ACS string containing the damage type.
;GAMEEVENT_ACTOR_ARMORDAMAGED 12 {{Devfeature|3.1|alpha}}
;GAMEEVENT_ACTOR_ARMORDAMAGED 12
:Behaves exactly like GAMEEVENT_ACTOR_DAMAGED but is triggered slightly earlier, just before an actor's armor can absorb any damage.
:Behaves exactly like GAMEEVENT_ACTOR_DAMAGED but is triggered slightly earlier, just before an actor's armor can absorb any damage.