Jump to content

EVENT scripts: Difference between revisions

Updated information about ACS EVENT scripts, including the new GAMEEVENT_CHAT type available in Zandronum 3.1.
(Created page with "EVENT scripts are scripts that are triggered by various in-game events: script 123 (int type, int arg1, int arg2) EVENT The event that caused the script to be fired is enum...")
 
(Updated information about ACS EVENT scripts, including the new GAMEEVENT_CHAT type available in Zandronum 3.1.)
Line 11: Line 11:
:Player receives a medal. The activator is the player who recieves the medal and <tt>arg1</tt> is the string containing the name of the medal.
:Player receives a medal. The activator is the player who recieves the medal and <tt>arg1</tt> is the string containing the name of the medal.
;GAMEEVENT_CAPTURES 2
;GAMEEVENT_CAPTURES 2
:Player captures the flag/skull. The activator is the capturing player and <tt>arg1</tt> is the player who assisted. If nobody assisted the capture, -1 is supplied instead.
:Player captures the flag/skull. The activator is the capturing player and <tt>arg1</tt> is the player who assisted. If nobody assisted the capture, -1 is supplied instead. In 3.1, <tt>arg2</tt> returns the number of points earned.
;GAMEEVENT_TOUCHES 3
;GAMEEVENT_TOUCHES 3
:Player touches the flag/skull. The activator is the player who touched the team item and <tt>arg1</tt> is the team index of the team whose flag/skull was touched.
:Player touches the flag/skull. The activator is the player who touched the team item and <tt>arg1</tt> is the team index of the team whose flag/skull was touched.
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 (<font color="darkblue">3.1</font> <font color="red">only</font>)
: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.


[[Category:Level Development]]
[[Category:Level Development]]
[[Category:ACS Functions]]
[[Category:ACS Functions]]