Half-Life 2: Deathmatch/Scripting/Game Events: Difference between revisions
Jump to navigation
Jump to search
Warning:Some events have parameter 'class' which cannot be accessed with dot syntax, i.e.
Tip:To see what events fire during the game, download this script (right click and Save Page), place it into your
SirYodaJedi (talk | contribs) mNo edit summary |
SirYodaJedi (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
{{toc-right}}{{back|VScript}} | {{toc-right}}{{back|VScript}} | ||
This article lists game events in [[Half-Life 2: Deathmatch]]. These were retrieved from | This article lists game events in [[Half-Life 2: Deathmatch]], in addition to the [[Source 2013 MP/Scripting/Game Events|base game events]]. These were retrieved from <code>modevents.res</code> in the <code>resource</code> folder. | ||
{{warning|Some events have parameter 'class' which cannot be accessed with dot syntax, i.e. <code>params.class</code>, as <code>class</code> is a reserved word in Squirrel. Instead, use string indexing like so: <code>params["class"]</code>}} | {{warning|Some events have parameter 'class' which cannot be accessed with dot syntax, i.e. <code>params.class</code>, as <code>class</code> is a reserved word in Squirrel. Instead, use string indexing like so: <code>params["class"]</code>}} | ||
{{tip|To see what events fire during the game, download [https://raw.githubusercontent.com/ficool2/vscript_tf/refs/heads/main/scripts/vscripts/showevents.nut this script] (right click and ''Save Page''), place it into your <code>scripts/vscripts/</code> folder and run <code>script_execute showevents</code> in console.}} | {{tip|To see what events fire during the game, download [https://raw.githubusercontent.com/ficool2/vscript_tf/refs/heads/main/scripts/vscripts/showevents.nut this script] (right click and ''Save Page''), place it into your <code>scripts/vscripts/</code> folder and run <code>script_execute showevents</code> in console.}} | ||
Line 6: | Line 6: | ||
== achievement_earned == | == achievement_earned == | ||
Unused, as HL2DM lacks achievements. | |||
* <b>player</b> <small>(byte)</small> - entindex of the player | * <b>player</b> <small>(byte)</small> - entindex of the player | ||
* <b>achievement</b> <small>(short)</small> - achievement ID | * <b>achievement</b> <small>(short)</small> - achievement ID | ||
== player_death == | == player_death == | ||
Line 180: | Line 15: | ||
* <b>attacker</b> <small>(short)</small> - user ID who killed | * <b>attacker</b> <small>(short)</small> - user ID who killed | ||
* <b>weapon</b> <small>(string)</small> - weapon name killed used | * <b>weapon</b> <small>(string)</small> - weapon name killed used | ||
== teamplay_round_start == | == teamplay_round_start == | ||
Line 337: | Line 20: | ||
* <b>full_reset</b> <small>(bool)</small> - is this a full reset of the map | * <b>full_reset</b> <small>(bool)</small> - is this a full reset of the map | ||
== | == spec_target_updated == | ||
Latest revision as of 12:43, 5 June 2025
This article lists game events in Half-Life 2: Deathmatch, in addition to the base game events. These were retrieved from modevents.res
in the resource
folder.

params.class
, as class
is a reserved word in Squirrel. Instead, use string indexing like so: params["class"]

scripts/vscripts/
folder and run script_execute showevents
in console.Todo: Distinguish which events are clientside and/or serverside
achievement_earned
Unused, as HL2DM lacks achievements.
- player (byte) - entindex of the player
- achievement (short) - achievement ID
player_death
a game event, name may be 32 charaters long
- userid (short) - user ID who died
- attacker (short) - user ID who killed
- weapon (string) - weapon name killed used
teamplay_round_start
round restart
- full_reset (bool) - is this a full reset of the map