Logic eventlistener

From Valve Developer Community
Revision as of 14:14, 7 May 2021 by Darnias (talk | contribs) ({{Not in FGD}})
Jump to navigation Jump to search

Template:Base point It can listen to events fired from code and fire and output when it happens. All event declarations can be found in these files:

resource/gameevents.res
resource/modeevents.res
resource/demoimportantevents.res
resource/serverevents.res
resource/hltvevents.res
resource/replayevents.res 
Confirm:The entity will stop working (firing outputs) after a save is reloaded.

Keyvalues

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Event Name ([todo internal name (i)]) <string>
The name of the event that you want to listen for.
Fetch Event Data ([todo internal name (i)]) <boolean> (in all games since Counter-Strike: Global Offensive)
Copies the game event data to the event_data table in the script scope of the listener entity when the event is fired.
Start Enabled ([todo internal name (i)]) <boolean>
Whetever this entity starts enabled or not.
Team Number ([todo internal name (i)]) <choices>
If set, will only fire its output if the event is generated from someone of the specified team.
  • -1: Don't care
  • 0: Unassigned !FGD
  • 1: Team 1 Portal 2, Spectators Counter-Strike: Global Offensive!FGD
  • 2: Team 2 (ORANGE) Portal 2, Terrorists Counter-Strike: Global Offensive
  • 3: Team 3 (BLUE) Portal 2, Counter-Terrorists Counter-Strike: Global Offensive

Inputs

EnableDisable:

Enable / Disable
Enable/disable this entity from performing its task. It might also disappear from view.

Outputs

OnEventFired
Fired when the event has been detected.