DCS enum world

From DCS World Wiki - Hoggitworld.com
Revision as of 00:12, 12 April 2018 by Grimes (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Scripting Root

Enumerator: world Added with: 1.2.0
Description: The world enumerator contains a listing of events that can occur within the simulator, birthplace that defines how an object was spawned, and the shapes used with the world.searchObjects function.

For each event see the pages for each event type

Event Types: shot, hit, takeoff, land, crash, ejection, refueling, dead, pilot_dead, base_captured, mission_start, mission_end, took_control, refueling_stop, birth, human_failure, detailed_failure, engine_startup, engine_shutdown, player_enter_unit, player_leave_unit, player_comment, shooting_start, shooting_end, mark_added, mark_change, mark_remove, kill, score, unit_lost, landing_after_ejection, discard_chair_after_ejection, weapon_add, landing_quality_mark, ai_abort_mission, weapon_drop, runway_takeoff, runway_touch,

Uses:
Format: The world enumerator contains 3 nested tables of event, BirthPlace, and VolumeType. These tables are formatted in the following manner with indexes corresponding to their constant values.
world= {
  event= {
    S_EVENT_INVALID = 0,
    S_EVENT_SHOT = 1,
    S_EVENT_HIT = 2,
     ...
 },
  BirthPlace= {
   wsBirthPlace_Air,
   wsBirthPlace_RunWay,
   wsBirthPlace_Park,
   ...  
 },
  VolumeType= {
    SEGMENT,
    BOX,
    SPHERE,
    PYRAMID
 }, 
}
constants: Below is a full listing of the event types and their corresponding ids.
0 =  S_EVENT_INVALID"
1 = "S_EVENT_SHOT"
2 = "S_EVENT_HIT"
3 = "S_EVENT_TAKEOFF"
4 = "S_EVENT_LAND"
5 = "S_EVENT_CRASH"
6 = "S_EVENT_EJECTION"
7 = "S_EVENT_REFUELING"
8 = "S_EVENT_DEAD"
9 = "S_EVENT_PILOT_DEAD"
10 = "S_EVENT_BASE_CAPTURED"
11 = "S_EVENT_MISSION_START"
12 = "S_EVENT_MISSION_END"
13 = "S_EVENT_TOOK_CONTROL"
14 = "S_EVENT_REFUELING_STOP"
15 = "S_EVENT_BIRTH"
16 = "S_EVENT_HUMAN_FAILURE"
17 = "S_EVENT_ENGINE_STARTUP"
18 = "S_EVENT_ENGINE_SHUTDOWN"
19 = "S_EVENT_PLAYER_ENTER_UNIT"
20 = "S_EVENT_PLAYER_LEAVE_UNIT"
21 = "S_EVENT_PLAYER_COMMENT"
22 = "S_EVENT_SHOOTING_START"
23 = "S_EVENT_SHOOTING_END"
24 = "S_EVENT_MAX'

BirthPlace events are logged as.

1 = "wsBirthPlace_Air"
3 = "wsBirthPlace_Ship"
4 = "wsBirthPlace_RunWay"
5 = "wsBirthPlace_Park"
9 = "wsBirthPlace_Heliport_Hot"       
10 = "wsBirthPlace_Heliport_Cold"
11 = "wsBirthPlace_Ship_Cold"
12 = "wsBirthPlace_Ship_Hot"

VolumeType shapes are defined as:

0 = "SEGMENT"
1 = "BOX"
2 = "SPHERE"
3 = "PYRAMID"
notes: