logic_eventlistener

From Source Entities
Jump to navigation Jump to search

Code classes:

logic_eventlistener is a point entity present in all games since P2.pngPortal 2. It fires an output when an event signified in code occurs.

A list of all events can be found in the following files:

  • pak01_dir.vpk/resource/gameevents.res
  • pak01_dir.vpk/resource/hltvevents.res
  • pak01_dir.vpk/resource/modevents.res
  • pak01_dir.vpk/resource/replayevents.res
  • pak01_dir.vpk/resource/serverevents.res
  • pak01_dir.vpk/resource/demoimportantevents.res Csgo-small.png

Keyvalues[edit | edit source]

Event Name (EventName) <string>
Name of the event to listen for.
Value Description Fires in
player_hurt A player was hurt P2.pngCsgo-small.png
player_use A player used their use key on something P2.pngCsgo-small.png
player_drop A player dropped a prop_weighted_cube P2.png
player_changename A player changed their Steam name P2.pngCsgo-small.png
break_prop A CBreakableProp was broken P2.pngCsgo-small.png
entity_killed A player or P2.pngturret has died P2.pngCsgo-small.png
physgun_pickup A player picked up a physics object P2.png
portal_player_portaled A player went through a portal P2.png
portal_enabled A weapon_portalgun was picked up, or a single-portal gun was upgraded P2.png
portal_fired A portal was fired P2.png
player_zoomed A player used their zoom view P2.png
player_unzoomed A player unzoomed P2.png
bounce_count A player jumped on repulsion gel on a surface facing upward, with a tolerance of roughly 23 degrees. P2.png
player_landed A player made contact with the ground P2.png
player_suppressed_bounce An airborne player suppressed their jumping on repulsion gel by crouching P2.png
server_cvar A server convar (such as sv_gravity) was changed P2.png
cs_pre_restart A new round is a split second away from starting Csgo-small.png
round_start A new round, or warmup, has started Csgo-small.png
round_end A round was won Csgo-small.png
round_freeze_end Freeze time has ended Csgo-small.png
player_death A player died Csgo-small.png
player_given_c4 A player was given a C4 at the start of the round, or found one in a crate in danger zone Csgo-small.png
bomb_dropped A weapon_c4 was dropped (by death or otherwise) Csgo-small.png
bomb_pickup A C4 was picked up (fires at the start of every round in defuse) Csgo-small.png
bomb_beginplant A player is starting to plant a C4 Csgo-small.png
bomb_planted A C4 was planted Csgo-small.png
bomb_exploded A C4 detonated Csgo-small.png
bomb_begindefuse A player has started to defuse a C4 Csgo-small.png
bomb_defused A player defused a C4 Csgo-small.png
hostage_rescued A player rescued a hostage. Does not fire in danger zone. Csgo-small.png
hostage_rescued_all Players rescued all hostages in the map. Does not fire in danger zone. Csgo-small.png
hostage_follows A player picked up a hostage Csgo-small.png
player_team A player joined a team (including spectators) Csgo-small.png
player_spawn A player respawned (does not fire at round start) Csgo-small.png
round_announce_match_point One team is one round away from winning at the start of this round (except when it's the final round of the half or of the map) Csgo-small.png
round_announce_final Start of the final round of the map Csgo-small.png
round_announce_match_start A round (not including warmup) has started Csgo-small.png
round_announce_warmup Warmup has started Csgo-small.png
round_time_warning Round timer has gone red (10 seconds left) Csgo-small.png
dm_bonus_weapon_start A deathmatch bonus weapon has been announced Csgo-small.png
break_breakable A func_breakable broke Csgo-small.png
other_death A non-player entity lost all of its health Csgo-small.png
item_purchase A player bought something. Does not fire in danger zone. Csgo-small.png
bomb_abortplant A C4 plant was interrupted (due to death or otherwise) Csgo-small.png
bomb_abortdefuse A C4 defuse was interrupted (due to death or otherwise) Csgo-small.png
hostage_hurt A hostage was hurt. Does not fire in danger zone Csgo-small.png
player_radio A player used a radio command Csgo-small.png
bomb_beep Fires every half-second after the bomb is planted until it detonates or is defused Csgo-small.png
weapon_fire A player pressed their primary attack button on a weapon (excluding C4) Csgo-small.png
weapon_fire_on_empty A player tried to fire a dry gun Csgo-small.png
grenade_thrown A player threw any kind of utility Csgo-small.png
weapon_zoom A player cycled through the scopes on a sniper rifle Csgo-small.png
silencer_detach A player started to detach the silencer from their gun Csgo-small.png
inspect_weapon A player inspected their weapon Csgo-small.png
weapon_zoom_rifle A player scoped or unscoped with an AUG or SG 553 Csgo-small.png
item_pickup An item of some kind was obtained by a player Csgo-small.png
enter_buyzone A player entered a buyzone Csgo-small.png
exit_buyzone A player left a buyzone Csgo-small.png
buytime_ended The buy period has run out Csgo-small.png
enter_bombzone A player entered a func_bomb_target Csgo-small.png
exit_bombzone A player left a bomb area Csgo-small.png
enter_rescue_zone A player entered a func_hostage_rescue Csgo-small.png
exit_rescue_zone A player left a rescue zone Csgo-small.png
silencer_off A silencer was taken off a weapon Csgo-small.png
silencer_on A silencer was put back on a weapon Csgo-small.png
grenade_bounce A grenade of any type bounced off a surface Csgo-small.png
hegrenade_detonate An HE grenade exploded Csgo-small.png
flashbang_detonate A flashbang exploded Csgo-small.png
smokegrenade_detonate A smoke grenade released smoke Csgo-small.png
smokegrenade_expired A smoke grenade cloud mostly dissipated Csgo-small.png
molotov_detonate A firebomb exploded in the air or on the ground Csgo-small.png
decoy_detonate A decoy grenade finished making sounds and exploded Csgo-small.png
decoy_started A decoy grenade started making gunfire sounds Csgo-small.png
tagrenade_detonate A tactical awareness grenade detonated Csgo-small.png
inferno_startburn A firebomb exploded on the ground Csgo-small.png
inferno_expire A firebomb's fire has gone out naturally or due to smoke Csgo-small.png
inferno_extinguish A firebomb's fire was choked out by smoke Csgo-small.png
decoy_firing A decoy made a gunfire sound Csgo-small.png
bullet_impact A bullet was fired (fires once for every surface the bullet hits/penetrates) Csgo-small.png
player_footstep An audible footstep was made Csgo-small.png
player_jump A player jumped Csgo-small.png
player_blind A player was blinded by a flashbang Csgo-small.png
player_falldamage A player took fall damage Csgo-small.png
firstbombs_incoming_warning First missile wave warning in danger zone Csgo-small.png
choppers_incoming_warning "Supply drop incoming" message in danger zone Csgo-small.png
survival_paradrop_spawn A prop_paradrop_crate was made Csgo-small.png
survival_paradrop_break A prop_paradrop_crate was broken Csgo-small.png
survival_no_respawns_warning Respawn cutoff warning shown in danger zone Csgo-small.png
survival_no_respawns_final Players can no longer respawn in danger zone Csgo-small.png
Start Enabled (IsEnabled) <boolean>
Entity starts active.
Team Number (TeamNum) <choices>
If set, will only fire its output if the event is generated from someone of the specified team.
Value P2.png Csgo-small.png
-1 Don't care Don't care
2 P-body Terrorists
3 Atlas CTs
Fetch Event Data (FetchEventData) <boolean> (only available in Csgo-small.png)
Copies the game event data to the event_data table in the script scope of this entity when the event is fired.

Inputs[edit | edit source]

Enable
Enables the entity.
Disable
Disables the entity.

Outputs[edit | edit source]

OnEventFired
Fires when the event occurs.

See Also[edit | edit source]