Day of Defeat: Source/Scripting/Game Events

From Valve Developer Community
Jump to navigation Jump to search
VScript

This article lists game events in Day of Defeat: 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

achievement_earned

  • player (byte) - entindex of the player
  • achievement (short) - achievement ID

christmas_gift_grab

Called when a player picks up a holiday_gift; used for achievement tracking

  • userid (short) - Steam ID of player who picked up the gift

dod_allies_ready

dod_axis_ready

dod_bomb_defused

  • cp (byte) - index of the point where the bomb was defused
  • cpname (string) - name of the point
  • userid (short) - user ID of the player that defused the bomb
  • team (byte) - team that defused

dod_bomb_exploded

  • cp (byte) - index of the point where the bomb exploded
  • cpname (string) - name of the point
  • userid (short) - user ID of the player that planted the bomb

dod_bomb_planted

  • cp (byte) - index of the point where the bomb was planted
  • cpname (string) - name of the point
  • userid (short) - user ID of the player that planted the bomb
  • team (byte) - team that planted

dod_broadcast_audio

Fired by server for the round victory music. Unlike teamplay_broadcast_audio, this plays for all teams.

  • sound (string) - sound to play

dod_capture_blocked

  • cp (byte) - index of the point that was blocked
  • cpname (string) - name of the point
  • blocker (byte) - index of the player that blocked the cap
  • bomb (bool) - was the block on a defuse or a plant?

dod_game_over

  • reason (string) - why the game is over ( timelimit, winlimit )

dod_hint

Unused.

  • hintmessage (string) - localizable string of a hint

dod_kill_defuser

Fired when a player dies while trying to defuse a bomb.

  • userid (short) - user ID of the player killed the defuser
  • victimid (short) - user ID of the player that was killed

dod_kill_planter

Fired when a player dies while trying to plant a bomb.

  • userid (short) - user ID of the player killed the planter
  • victimid (short) - user ID of the player that was killed

dod_map_time_remaining

Called when the round timer starts, including after resets

  • seconds (short)

dod_point_captured

Fired by server immediately after all of dod_control_point's capture-related outputs, only if not a point reset.

  • cp (byte) - index of the point that was captured
  • cpname (string) - name of the point
  • cappers (string) - string where each character is a player index of someone that capped
  • bomb (bool) - was this a bomb exploding

dod_ready_restart

dod_restart_round

dod_round_active

called when round is active, players can move

dod_round_restart_seconds

  • seconds (short)

dod_round_start

dod_round_win

  • team (byte) - which team won the round

dod_stats_player_damage

  • attacker (short) - userid of the attacker
  • victim (short) - userid of the victim
  • weapon (byte) - weapon id
  • damage (short) - total damage in this shot
  • damage_given (byte) - applied damage, not to exceed health
  • distance (float) - distance of the shot
  • hitgroup (byte) - hitgroup that was hit

dod_stats_player_killed

  • attacker (byte)
  • victim (byte)
  • weapon (byte)

dod_stats_weapon_attack

  • attacker (short)
  • weapon (byte)

dod_team_scores

  • allies_caps (short) - how many rounds won by Allies
  • allies_tick (short) - how many tick points Allies have
  • allies_players (byte) - how many players Allies have
  • axis_caps (short) - .. same for Axis.
  • axis_tick (short)
  • axis_players (byte)

dod_tick_points

  • team (byte) - which team scored tick points
  • score (byte) - how many did they score
  • totalscore (short) - the new total score

dod_timer_flash

  • time_remaining (short) - how many seconds until the round ends

dod_timer_time_added

  • seconds_added (short) - how many seconds were added to the round timer

dod_tnt_pickup

Fired clientside when picking up a weapon of type "Bomb"

dod_warmup_begins

dod_warmup_ends

dod_win_panel

  • show_timer_defend (bool)
  • show_timer_attack (bool)
  • timer_time (short)
  • final_event (byte) - 0 - no event, 1 - bomb exploded, 2 - flag capped, 3 - timer expired
  • category_left (byte) - 0-4: none, bombers, cappers, defenders, killers
  • left_1 (byte) - player index if first
  • left_score_1 (byte)
  • left_2 (byte)
  • left_score_2 (byte)
  • left_3 (byte)
  • left_score_3 (byte)
  • category_right (byte)
  • right_1 (byte)
  • right_score_1 (byte)
  • right_2 (byte)
  • right_score_2 (byte)
  • right_3 (byte)
  • right_score_3 (byte)

freezecam_started

hide_freezepanel

player_changeclass

  • userid (short) - user ID who changed class
  • class (short) - class that they changed to

player_death

  • userid (short) - user ID who died
  • attacker (short) - user ID who killed
  • weapon (string) - weapon name killed used
  • dominated (bool)
  • revenge (bool)

player_hurt

  • userid (short) - user ID who was hurt
  • attacker (short) - user ID who attacked
  • weapon (string) - weapon name attacker used
  • health (byte) - health remaining
  • damage (byte) - how much damage in this attack
  • hitgroup (byte) - what hitgroup was hit

show_freezepanel

  • killer (short) - entindex of the killer entity

spec_target_updated