niod-core › Globals › “dcs/event”
Module: “dcs/event”
Index
Type aliases
- Event
- EventAirbase
- EventBaseCaptured
- EventBirth
- EventBlueCoalition
- EventCrash
- EventDead
- EventDetailedFailure
- EventEjection
- EventEngineShutdown
- EventEngineStartup
- EventHandler
- EventHit
- EventHumanFailure
- EventKill
- EventLand
- EventLandingAfterEjection
- EventLeaveUnit
- EventMarkAdded
- EventMarkChange
- EventMarkRemove
- EventMissionEnd
- EventMissionStart
- EventNeutralCoalition
- EventObject
- EventPilotDead
- EventPlayerComment
- EventPlayerEnterUnit
- EventRedCoalition
- EventRefueling
- EventRefuelingStop
- EventScore
- EventShootingEnd
- EventShootingStart
- EventShot
- EventTakeoff
- EventUnit
- EventUnitLost
- EventWeapon
Functions
Object literals
Type aliases
Event
Defined in dcs/event.ts:346
EventAirbase
Ƭ EventAirbase: object
Defined in dcs/event.ts:16
Represents an airbase returned by a DCS event
Type declaration:
- _id: number
EventBaseCaptured
Ƭ EventBaseCaptured: object
Defined in dcs/event.ts:52
Occurs when a ground unit captures either an airbase or a farp. Source: https://wiki.hoggitworld.com/view/DCS_event_base_captured
Type declaration:
-
id: 10
-
initiator: EventUnit
-
place: EventAirbase
-
subplace: 0
-
time: number
EventBirth
Ƭ EventBirth: object
Defined in dcs/event.ts:63
Occurs when any object is spawned into the mission. Source: https://wiki.hoggitworld.com/view/DCS_event_birth
Type declaration:
-
id: 15
-
initiator: EventUnit
-
time: number
EventBlueCoalition
Ƭ EventBlueCoalition: 2
Defined in dcs/event.ts:47
Represents the blue returned by a DCS event
EventCrash
Ƭ EventCrash: object
Defined in dcs/event.ts:72
Occurs when any aircraft crashes into the ground and is completely destroyed. Source: https://wiki.hoggitworld.com/view/DCS_event_crash
Type declaration:
-
id: 5
-
initiator: EventUnit
-
time: number
EventDead
Ƭ EventDead: object
Defined in dcs/event.ts:81
Occurs when an object is completely destroyed. Source: https://wiki.hoggitworld.com/view/DCS_event_dead
Type declaration:
-
id: 8
-
initiator: EventUnit
-
time: number
EventDetailedFailure
Ƭ EventDetailedFailure: object
Defined in dcs/event.ts:90
Unknown precisely what creates this event, likely tied into newer damage model. Will update this page when new information become available. Source: https://wiki.hoggitworld.com/view/DCS_event_detailed_failure
Type declaration:
-
id: 17
-
initiator: EventUnit
-
time: number
EventEjection
Ƭ EventEjection: object
Defined in dcs/event.ts:99
Occurs when a pilot ejects from an aircraft. Source: https://wiki.hoggitworld.com/view/DCS_event_ejection
Type declaration:
-
id: 6
-
initiator: EventUnit
-
time: number
EventEngineShutdown
Ƭ EventEngineShutdown: object
Defined in dcs/event.ts:108
Occurs when any aircraft shuts down its engines. Source: https://wiki.hoggitworld.com/view/DCS_event_engine_shutdown
Type declaration:
-
id: 19
-
initiator: EventUnit
-
time: number
EventEngineStartup
Ƭ EventEngineStartup: object
Defined in dcs/event.ts:117
Occurs when any aircraft starts its engines. Source: https://wiki.hoggitworld.com/view/DCS_event_engine_startup
Type declaration:
-
id: 18
-
initiator: EventUnit
-
time: number
EventHandler
Ƭ EventHandler: function
Defined in dcs/event.ts:408
Type declaration:
▸ (payload
: T): void
Parameters:
Name | Type |
---|---|
payload |
T |
EventHit
Ƭ EventHit: object
Defined in dcs/event.ts:126
Occurs whenever an object is hit by a weapon. Source: https://wiki.hoggitworld.com/view/DCS_event_hit
Type declaration:
-
id: 2
-
initiator: EventUnit
-
target: EventObject
-
time: number
-
weapon: EventWeapon
EventHumanFailure
Ƭ EventHumanFailure: object
Defined in dcs/event.ts:137
Occurs when any system fails on a human controlled aircraft. Source: https://wiki.hoggitworld.com/view/DCS_event_human_failure
Type declaration:
-
id: 16
-
initiator: EventUnit
-
time: number
EventKill
Ƭ EventKill: object
Defined in dcs/event.ts:146
Occurs on the death of a unit. Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. Source: https://wiki.hoggitworld.com/view/DCS_event_kill
Type declaration:
-
id: 28
-
initiator: EventUnit
-
target: EventUnit
-
time: number
-
weapon: EventWeapon
-
weapon_name: string
EventLand
Ƭ EventLand: object
Defined in dcs/event.ts:158
Occurs when an aircraft lands at an airbase, farp or ship. Source: https://wiki.hoggitworld.com/view/DCS_event_land
Type declaration:
-
id: 4
-
initiator: EventUnit
-
place: EventObject
-
sbuPlace: 0
-
time: number
EventLandingAfterEjection
Ƭ EventLandingAfterEjection: object
Defined in dcs/event.ts:169
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up. Source: https://wiki.hoggitworld.com/view/DCS_event_landing_after_ejection
Type declaration:
EventLeaveUnit
Ƭ EventLeaveUnit: object
Defined in dcs/event.ts:265
Occurs when any player relieves control of a unit to the AI. Source: https://wiki.hoggitworld.com/view/DCS_event_player_leave_unit
Type declaration:
-
id: 21
-
initiator: EventUnit
-
time: number
EventMarkAdded
Ƭ EventMarkAdded: object
Defined in dcs/event.ts:180
Occurs when mark panels get added to the mission by players or scripting functions. Source: https://wiki.hoggitworld.com/view/DCS_event_mark_added
Type declaration:
-
coalition: *EventNeutralCoalition EventRedCoalition EventBlueCoalition* -
groupID: number
-
id: 25
-
idx: number
-
initiator: EventUnit
-
pos: Vector3
-
text: string
- time: number
EventMarkChange
Ƭ EventMarkChange: object
Defined in dcs/event.ts:194
Occurs when a mark panel is modified by a player. Source: https://wiki.hoggitworld.com/view/DCS_event_mark_change
Type declaration:
-
coalition: *EventNeutralCoalition EventRedCoalition EventBlueCoalition* -
groupID: number
-
id: 26
-
idx: number
-
initiator: EventUnit
-
pos: Vector3
-
text: string
- time: number
EventMarkRemove
Ƭ EventMarkRemove: object
Defined in dcs/event.ts:208
Occurs when mark panels get removed from the mission by players or scripting functions. Source: https://wiki.hoggitworld.com/view/DCS_event_mark_remove
Type declaration:
-
coalition: *EventNeutralCoalition EventRedCoalition EventBlueCoalition* -
groupID: number
-
id: 27
-
idx: number
-
initiator: EventUnit
-
pos: Vector3
-
text: string
- time: number
EventMissionEnd
Ƭ EventMissionEnd: object
Defined in dcs/event.ts:222
Occurs when a mission ends. Source: https://wiki.hoggitworld.com/view/DCS_event_mission_end
Type declaration:
-
id: 12
-
time: number
EventMissionStart
Ƭ EventMissionStart: object
Defined in dcs/event.ts:230
Occurs when a mission starts. Source: https://wiki.hoggitworld.com/view/DCS_event_mission_start
Type declaration:
-
id: 1
-
time: number
EventNeutralCoalition
Ƭ EventNeutralCoalition: -1
Defined in dcs/event.ts:37
Represents the neutral coalition returned by a DCS event
EventObject
Ƭ EventObject: object
Defined in dcs/event.ts:30
Represents an object returned by a DCS event
Type declaration:
- _id: number
EventPilotDead
Ƭ EventPilotDead: object
Defined in dcs/event.ts:238
Occurs when the pilot of an aircraft is killed. Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. Source: https://wiki.hoggitworld.com/view/DCS_event_pilot_dead
Type declaration:
-
id: 9
-
initiator: EventUnit
-
time: number
EventPlayerComment
Ƭ EventPlayerComment: object
Defined in dcs/event.ts:247
Typically corresponds to generalized events that create a triggered message called directly from the game itself. Currently the only known cause appears to display a landing score when AI and occasionally when players land on an aircraft carrier. Source: https://wiki.hoggitworld.com/view/DCS_event_player_comment
Type declaration:
-
comment: string
-
id: 22
-
time: number
EventPlayerEnterUnit
Ƭ EventPlayerEnterUnit: object
Defined in dcs/event.ts:256
Occurs when any player assumes direct control of a unit. Source: https://wiki.hoggitworld.com/view/DCS_event_player_enter_unit
Type declaration:
-
id: 20
-
initiator: EventUnit
-
time: number
EventRedCoalition
Ƭ EventRedCoalition: 1
Defined in dcs/event.ts:42
Represents the red coalition returned by a DCS event
EventRefueling
Ƭ EventRefueling: object
Defined in dcs/event.ts:274
Occurs when an aircraft connects with a tanker and begins taking on fuel. Source: https://wiki.hoggitworld.com/view/DCS_event_refueling
Type declaration:
-
id: 7
-
initiator: EventUnit
-
time: number
EventRefuelingStop
Ƭ EventRefuelingStop: object
Defined in dcs/event.ts:283
Occurs when an aircraft is finished taking fuel. Source: https://wiki.hoggitworld.com/view/DCS_event_refueling_stop
Type declaration:
-
id: 14
-
initiator: EventUnit
-
time: number
EventScore
Ƭ EventScore: object
Defined in dcs/event.ts:292
Occurs when any modification to the “Score” as seen on the debrief menu would occur. There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. Source: https://wiki.hoggitworld.com/view/DCS_event_score
Type declaration:
-
id: 29
-
time: number
EventShootingEnd
Ƭ EventShootingEnd: object
Defined in dcs/event.ts:300
Occurs when any unit stops firing its weapon. Event will always correspond with a shooting start event. Source: https://wiki.hoggitworld.com/view/DCS_event_shooting_end
Type declaration:
-
id: 24
-
initiator: EventUnit
-
time: number
EventShootingStart
Ƭ EventShootingStart: object
Defined in dcs/event.ts:309
Occurs when any unit begins firing a weapon that has a high rate of fire. Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Source: https://wiki.hoggitworld.com/view/DCS_event_shooting_start
Type declaration:
EventShot
Ƭ EventShot: object
Defined in dcs/event.ts:319
Occurs whenever any unit in a mission fires a weapon. But not any machine gun or autocannon based weapon, those are handled by shooting_start. Source: https://wiki.hoggitworld.com/view/DCS_event_shot
Type declaration:
-
id: 1
-
initiator: EventUnit
-
time: number
-
weapon: EventWeapon
EventTakeoff
Ƭ EventTakeoff: object
Defined in dcs/event.ts:329
Occurs when an aircraft takes off from an airbase, farp, or ship. Source: https://wiki.hoggitworld.com/view/DCS_event_takeoff
Type declaration:
-
id: 3
-
initiator: EventUnit
-
place: EventObject
-
subPlace: 0
-
time: number
EventUnit
Ƭ EventUnit: object
Defined in dcs/event.ts:9
Represents an unit returned by a DCS event
Type declaration:
- _id: number
EventUnitLost
Ƭ EventUnitLost: object
Defined in dcs/event.ts:340
Occurs when the game thinks an object is destroyed. Source: https://wiki.hoggitworld.com/view/DCS_event_unit_lost
Type declaration:
-
id: 30
-
initiator: EventUnit
-
time: number
EventWeapon
Ƭ EventWeapon: object
Defined in dcs/event.ts:23
Represents a weapon returned by a DCS event
Type declaration:
- _id: number
Functions
Const
addEventHandler
▸ addEventHandler‹T›(id
: number, handler
: EventHandler‹T›): string
Defined in dcs/event.ts:433
Type parameters:
▪ T
The type of the event payload that will be handled.
Parameters:
Name | Type | Description |
---|---|---|
id |
number | The id of the event that is handled. Note: you should use the constants in the EVENTS object |
handler |
EventHandler‹T› | The function handling the event, this is a generic function si a type must be provided |
Returns: string
the id of the handler that was created
Const
handleEvent
▸ handleEvent‹T›(id
: number, payload
: T): void
Defined in dcs/event.ts:415
Type parameters:
▪ T
The type of the event payload that is handled.
Parameters:
Name | Type | Description |
---|---|---|
id |
number | The id of the event that is handled. Note: you should use the constants in the EVENTS object |
payload |
T | The payload passed to the handler |
Returns: void
Const
removeEventHandler
▸ removeEventHandler(id
: number, handlerId
: string): void
Defined in dcs/event.ts:448
Parameters:
Name | Type | Description |
---|---|---|
id |
number | The id of the event that is handled. Note: you should use the constants in the EVENTS object |
handlerId |
string | The id of the handler, you can retrieve this when adding a handler |
Returns: void
Object literals
Const
EVENTS
▪ EVENTS: object
Defined in dcs/event.ts:377
EventBaseCaptured
• EventBaseCaptured: number = 10
Defined in dcs/event.ts:378
EventBirth
• EventBirth: number = 15
Defined in dcs/event.ts:379
EventCrash
• EventCrash: number = 5
Defined in dcs/event.ts:380
EventDead
• EventDead: number = 8
Defined in dcs/event.ts:381
EventDetailedFailure
• EventDetailedFailure: number = 17
Defined in dcs/event.ts:382
EventEjection
• EventEjection: number = 6
Defined in dcs/event.ts:383
EventEngineShutdown
• EventEngineShutdown: number = 19
Defined in dcs/event.ts:384
EventEngineStartup
• EventEngineStartup: number = 18
Defined in dcs/event.ts:385
EventHit
• EventHit: number = 2
Defined in dcs/event.ts:386
EventKill
• EventKill: number = 28
Defined in dcs/event.ts:387
EventLand
• EventLand: number = 4
Defined in dcs/event.ts:388
EventLandingAfterEjection
• EventLandingAfterEjection: number = 31
Defined in dcs/event.ts:389
EventLeaveUnit
• EventLeaveUnit: number = 21
Defined in dcs/event.ts:398
EventMarkAdded
• EventMarkAdded: number = 25
Defined in dcs/event.ts:390
EventMarkChange
• EventMarkChange: number = 26
Defined in dcs/event.ts:391
EventMarkRemove
• EventMarkRemove: number = 27
Defined in dcs/event.ts:392
EventMissionEnd
• EventMissionEnd: number = 12
Defined in dcs/event.ts:393
EventMissionStart
• EventMissionStart: number = 1
Defined in dcs/event.ts:394
EventPilotDead
• EventPilotDead: number = 9
Defined in dcs/event.ts:395
EventPlayerComment
• EventPlayerComment: number = 22
Defined in dcs/event.ts:396
EventPlayerEnterUnit
• EventPlayerEnterUnit: number = 20
Defined in dcs/event.ts:397
EventRefueling
• EventRefueling: number = 7
Defined in dcs/event.ts:399
EventRefuelingStop
• EventRefuelingStop: number = 14
Defined in dcs/event.ts:400
EventScore
• EventScore: number = 29
Defined in dcs/event.ts:401
EventShootingEnd
• EventShootingEnd: number = 24
Defined in dcs/event.ts:402
EventShootingStart
• EventShootingStart: number = 23
Defined in dcs/event.ts:403
EventShot
• EventShot: number = 1
Defined in dcs/event.ts:404
EventTakeoff
• EventTakeoff: number = 3
Defined in dcs/event.ts:405
EventUnitLost
• EventUnitLost: number = 30
Defined in dcs/event.ts:406