Half-Life Deathmatch: Source/Scripting/Game Events: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Replaced content with "{{toc-right}} This article lists game events in Half-Life Deathmatch: Source, in addition to the 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>para...")
Tag: Replaced
No edit summary
 
Line 1: Line 1:
{{toc-right}}
{{toc-right}}{{back|Vscript}}
This article lists game events in [[Half-Life Deathmatch: Source]], 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.
This article lists game events in [[Half-Life Deathmatch: Source]], 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>}}

Latest revision as of 12:41, 5 June 2025

Vscript

This article lists game events in Half-Life Deathmatch: Source, in addition to the base game events. These were retrieved from modevents.res in the resource folder.

Warning.pngWarning:Some events have parameter 'class' which cannot be accessed with dot syntax, i.e. params.class, as class is a reserved word in Squirrel. Instead, use string indexing like so: params["class"]
Tip.pngTip:To see what events fire during the game, download this script (right click and Save Page), place it into your scripts/vscripts/ folder and run script_execute showevents in console.
Todo: Distinguish which events are clientside and/or serverside

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

spec_target_updated