EVENT scripts: Difference between revisions

Correct arguments for GAMEEVENT_PLAYERLEAVESSERVER
(Documented GAMEEVENT_PLAYERLEAVESSERVER)
Tag: Source edit
(Correct arguments for GAMEEVENT_PLAYERLEAVESSERVER)
Tag: Source edit
Line 38: Line 38:
:When a team gets a point for controlling point sector in [[Game Modes#Domination|Domination]]. The activator is always the world, <tt>arg1</tt> is the team index that occupies the sector, and <tt>arg2</tt> is a dynamic ACS string containing the name of the sector.
:When a team gets a point for controlling point sector in [[Game Modes#Domination|Domination]]. The activator is always the world, <tt>arg1</tt> is the team index that occupies the sector, and <tt>arg2</tt> is a dynamic ACS string containing the name of the sector.
;{{Devfeature|3.2|alpha}} GAMEEVENT_PLAYERLEAVESSERVER 15
;{{Devfeature|3.2|alpha}} GAMEEVENT_PLAYERLEAVESSERVER 15
:When a player disconnects from the server (the opposite of GAMEEVENT_PLAYERCONNECT). This is not to be confused with {{Zdoomwiki|Script types#DISCONNECT|DISCONNECT scripts}} which fire when a player leaves the game, including becoming a spectator. <tt>arg1</tt> indicates the reason the player disconnected, see [[#Leave reasons|Leave reasons]] below.
:When a player disconnects from the server (the opposite of GAMEEVENT_PLAYERCONNECT). This is not to be confused with {{Zdoomwiki|Script types#DISCONNECT|DISCONNECT scripts}} which fire when a player leaves the game, including becoming a spectator. The activator is the world, <tt>arg1</tt> is the number of the player who disconnected, and <tt>arg2</tt> indicates the reason the player disconnected - see [[#Leave reasons|Leave reasons]] below.


== Event handling==
== Event handling==
Line 75: Line 75:


=== Leave reasons ===
=== Leave reasons ===
The argument passed to '''GAMEEVENT_PLAYERLEAVESSERVER''' indicates the reason a player disconnected from the server:
The second argument passed to '''GAMEEVENT_PLAYERLEAVESSERVER''' indicates the reason a player disconnected from the server:


;LEAVEREASON_LEFT 0  
;LEAVEREASON_LEFT 0