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