DCS func addGroup: Difference between revisions
From DCS World Wiki - Hoggitworld.com
m 1 revision imported |
No edit summary |
||
| (7 intermediate revisions by 3 users not shown) | |||
| Line 14: | Line 14: | ||
|desc= Dynamically spawns a group of the specified category for the specified country. Group data table is in the same format as created by the mission editor. | |desc= Dynamically spawns a group of the specified category for the specified country. Group data table is in the same format as created by the mission editor. | ||
See [[DCS_enum_country|country page]] and [[DCS_Class_Group|group class page]] for the list of countries by id and group categories. | |||
The coalition of the group is defined by the coalition its country belongs to. | The coalition of the group is defined by the coalition its country belongs to. | ||
| Line 45: | Line 47: | ||
|optType2= | |optType2= | ||
|examples= | |examples= Detailed Examples Linked Below: | ||
[[DCS_exam_group_ground|Ground Group]] | |||
[[DCS_exam_group_ship|Ship Group]] | |||
[[DCS_exam_group_heli|Helicopter Group]] | |||
[[DCS_exam_group_plane|Plane Group]] | |||
A basic table for a ground unit | |||
<pre> | <pre> | ||
local groupData = { | local groupData = { | ||
| Line 95: | Line 104: | ||
lateActivation boolean value that can override start_time to force the group to spawn in via trigger | lateActivation boolean value that can override start_time to force the group to spawn in via trigger | ||
hidden boolean whether or not the group is visible on the F10 map view | hidden boolean whether or not the group is visible on the F10 map view | ||
hiddenOnPlanner boolean if true the group will be hidden on the mission planner available in single player. | |||
hiddenOnMFD boolean if true this group will not be auto populated on relevant aircraft map screens and avionics. For instance SAM rings in F-16/F-18 and AH-64 threats pages | |||
route table complex table defining the route and tasks assigned to the group | route table complex table defining the route and tasks assigned to the group | ||
| Line 105: | Line 116: | ||
Optional Group Values (Ground and Ships) | Optional Group Values (Ground and Ships) | ||
visible boolean For whether or not the group is visible before its start time | visible boolean For whether or not the group is visible before its start time | ||
uncontrollable boolean corresponds to "Game Master Only" setting in editor. Dictates whether or not ground commanders can give orders to the group. | |||
Optional Group Values (Ground only) | |||
manualHeading boolean When spawned with a route assigned each unit in the group will automatically be pointing toward the next waypoint in the route. When set to true each unit will respect their own heading value. | |||
Required Unit values | Required Unit values | ||
| Line 123: | Line 139: | ||
heading number heading of the object in radians | heading number heading of the object in radians | ||
skill string of the units skill level. Can be "Excellent", "High", "Good", "Average", "Random", "Player" | skill string of the units skill level. Can be "Excellent", "High", "Good", "Average", "Random", "Player" | ||
Optional Unit Values for Ground | |||
coldAtStart boolean if true the vehicle will start with its engine off and should take some time to appear on FLIR | |||
playerCanDrive boolean if true Combined Arms players can take direct control of the unit. | |||
Aircraft and Helicopter values | Aircraft and Helicopter values | ||
livery_id | AddPropAircraft table additional aircraft properties for some contains the datalink ID information for that unit. | ||
psi | livery_id string name of the livery for the aircraft | ||
onboard_num string of the tail number on the aircraft | psi number | ||
onboard_num string of the tail number on the aircraft | |||
parking_landing number the "Term_Index" associated with the landing parking spot see Airbase.getParking | |||
parking_landing_id string displayd value in the mission editor of the parking spot the unit will taxi to on landing | |||
parking string of a number of the "Term_Index" associated with the starting parking spot see Airbase.getParking | |||
parking_id string displayed value in the mission editor where the unit starts parked at | |||
datalinks table defines the link16, SADL, or Longbow Net data used for that specific unit | |||
Helicopter Values | Helicopter Values | ||
ropeLength number length of a rope used for sling loading, default is 15 | ropeLength number length of a rope used for sling loading, default is 15 | ||
| Line 139: | Line 165: | ||
Route table can be empty or assigned to the group after spawning using [[DCS_func_getController|getController]] and [[DCS_func_pushTask|pushTask]] functions. | Route table can be empty or assigned to the group after spawning using [[DCS_func_getController|getController]] and [[DCS_func_pushTask|pushTask]] functions. | ||
See [[DCS_task_mission|page on mission task]] for more information regarding the route table. | See [[DCS_task_mission|page on mission task]] for more information regarding the route table. | ||
FARPs are spawned using the addGroup function, with groupCategory set to -1 | |||
Payload table | Payload table | ||
| Line 144: | Line 172: | ||
}} | }} | ||
[[Category:Singleton Functions|addGroup]] | [[Category:Singleton Functions|addGroup]] | ||
[[Category:Game Patch 1.2.4|addGroup]] | |||
