Targetname (GoldSrc): Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
Line 8: Line 8:
== Player Events ==
== Player Events ==
Any entity with the following targetnames will be targeted when that event occurs.
Any entity with the following targetnames will be targeted when that event occurs.
* <code>game_playerdie</code> - Fires every time a {{ent|player}} dies. The player who died is the activator.
* <code>game_playerdie</code> - Fires every time a {{ent|player|engine=goldsrc}} dies. The player who died is the activator.
* <code>game_playerkill</code> - Fires every time a {{ent|player}} kills another player, the killer is the activator.
* <code>game_playerkill</code> - Fires every time a {{ent|player|engine=goldsrc}} kills another player, the killer is the activator.
* <code>game_playerjoin</code> - Fires every time a {{ent|player}} joins the game in multiplayer, the joining player is the activator.
* <code>game_playerjoin</code> - Fires every time a {{ent|player|engine=goldsrc}} joins the game in multiplayer, the joining player is the activator.
* <code>game_playerspawn</code> - Fires every time a {{ent|player}} spawns, with the spawning player as the activator.
* <code>game_playerspawn</code> - Fires every time a {{ent|player|engine=goldsrc}} spawns, with the spawning player as the activator.
* <code>game_playerleave</code> - Fires every time a {{ent|player}} leaves the game, the player that is leaving is the activator.
* <code>game_playerleave</code> - Fires every time a {{ent|player|engine=goldsrc}} leaves the game, the player that is leaving is the activator.

Revision as of 05:54, 21 April 2025

Edit Tabs

Stub

This article or section is a stub. You can help by expanding it.

A targetname (also known simply as Name) is the name of an entity. A targetname is not required for an entity to exist, but generally must be present for an entity to be a target or killtarget of another entity.

To avoid issues, targetnames should not have any special characters, only ASCII letters, numbers, hyphens, and underscores.

Confirm:Using hash/pound signs in the targetname may make it unable to be targeted by multi_manager.

Player Events

Any entity with the following targetnames will be targeted when that event occurs.

  • game_playerdie - Fires every time a player dies. The player who died is the activator.
  • game_playerkill - Fires every time a player kills another player, the killer is the activator.
  • game_playerjoin - Fires every time a player joins the game in multiplayer, the joining player is the activator.
  • game_playerspawn - Fires every time a player spawns, with the spawning player as the activator.
  • game_playerleave - Fires every time a player leaves the game, the player that is leaving is the activator.