├── template.lua ├── voiceChat.lua ├── atmosphere.lua ├── coord.lua ├── env.lua ├── README.md ├── timer.lua ├── world.lua ├── net.lua ├── land.lua ├── enums.lua ├── missionCommands.lua ├── coalition.lua ├── trigger.lua └── classes.lua /template.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | 3 | ---desc 4 | ---https://wiki.hoggitworld.com/view/Category:Singleton 5 | nameOfSingleton = {} 6 | 7 | 8 | ---desc 9 | ---weblink 10 | ---@return any Group 11 | ---@param countryId any 12 | ---@param groupCategory any 13 | ---@param groupData table 14 | function coalition.addGroup(countryId, groupCategory, groupData) end 15 | 16 | return nameOfSingleton -------------------------------------------------------------------------------- /voiceChat.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | 3 | ---desc 4 | ---weblink 5 | VoiceChat = {} 6 | 7 | ---The voice chat singleton is a means of creating customized voice chat rooms for players to interact with each other in multiplayer. 8 | ---https://wiki.hoggitworld.com/view/DCS_singleton_voiceChat 9 | ---@return nil 10 | ---@param roomName string 11 | ---@param side number 12 | ---@param roomType number 13 | function VoiceChat.createRoom(roomName, side, roomType) end 14 | 15 | return VoiceChat -------------------------------------------------------------------------------- /atmosphere.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | 3 | ---atmosphere is a singleton whose functions return atmospheric data about the mission. Currently limited only to wind data. 4 | atmosphere = {} 5 | 6 | ---Returns a velocity vector of the wind at a specified point 7 | ---@param vec3 table 8 | ---@return table 9 | function atmosphere.getWind(vec3) end 10 | 11 | ---Returns a velocity vector of the wind at a specified point, this time factoring turbulence into the equation. 12 | ---@param vec3 table 13 | ---@return table 14 | function atmosphere.getWindWithTurbulence(vec3) end 15 | 16 | ---Returns the temperature and pressure at a given point in 3d space. Temperature is returned in Kelvins Pressure is returned in Pascals 17 | ---@param vec3 table 18 | ---@return table 19 | function atmosphere.getTemperatureAndPressure(vec3) end 20 | 21 | return atmosphere -------------------------------------------------------------------------------- /coord.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | 3 | --- The coord singleton contains functions used to convert coordinates between the game's XYZ, Longitude and Latitude, and the MGRS coordinate systems. 4 | ---https://wiki.hoggitworld.com/view/DCS_singleton_coord 5 | coord = {} 6 | 7 | ---Returns a point from latitude and longitude in the vec3 format. 8 | ---vec3 coord.LLtoLO(GeoCoord latitude , GeoCoord longitude , number altitude) 9 | ---https://wiki.hoggitworld.com/view/DCS_func_LLtoLO 10 | ---@return table vec3 11 | ---@param latitude any GeoCoord 12 | ---@param longitude any GeoCoord 13 | ---@param altitude number 14 | function coord.LLtoLO(latitude, longitude, altitude) end 15 | 16 | ---Returns multiple values of a given vec3 point in latitude, longitude, and altitude. 17 | ---https://wiki.hoggitworld.com/view/DCS_func_LOtoLL 18 | ---@return number latitude, number longitude, number altitude 19 | ---@param vec3 table 20 | function coord.LOtoLL(vec3) end 21 | 22 | --- Returns an MGRS table from the latitude and longitude coordinates provided. Note that in order to get the MGRS coordinate from a vec3 you must first use coord.LOtoLL on it. 23 | ---https://wiki.hoggitworld.com/view/DCS_func_LLtoMGRS 24 | ---@return table MGRS 25 | ---@param latitude any GeoCoord 26 | ---@param longitude any GeoCoord 27 | function coord.LLtoMGRS(latitude , longitude) end 28 | 29 | ---Returns multiple values of a given in MGRS coordinates and converts it to latitude, longitude, and altitude. 30 | ---https://wiki.hoggitworld.com/view/DCS_func_MGRStoLL 31 | ---@return number latitude, number longitude, number altitude 32 | ---@param MGRS table 33 | function coord.MGRStoLL(MGRS) end -------------------------------------------------------------------------------- /env.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | 3 | ---env contains basic logging functions useful for debugging scripting commands. The input text is automatically added to dcs.log in your saved games folder, default location: C:\Users\<>\Saved Games\DCS\Logs. 4 | ---Lua syntax errors are automatically generated and placed in the dcs.log file. 5 | ---https://wiki.hoggitworld.com/view/DCS_singleton_env 6 | env = {} 7 | 8 | ---Prints the passed string to the dcs.log with a prefix of 'info'. The optional variable defines whether or not a message box will pop up when the logging occurs. 9 | ---https://wiki.hoggitworld.com/view/DCS_func_info 10 | ---@return function 11 | ---@param log string 12 | ---@param showMessageBox boolean 13 | function env.info(log, showMessageBox) end 14 | 15 | ---Prints the passed string to the dcs.log with a prefix of 'warning'. The optional variable defines whether or not a message box will pop up when the logging occurs. 16 | ---https://wiki.hoggitworld.com/view/DCS_func_warning 17 | ---@return function 18 | ---@param log string 19 | ---@param showMessageBox boolean 20 | function env.warning(log, showMessageBox) end 21 | 22 | ---Prints the passed string to the dcs.log with a prefix of 'error'. The optional variable defines whether or not a message box will pop up when the logging occurs. 23 | ---https://wiki.hoggitworld.com/view/DCS_func_warning 24 | ---@return function 25 | ---@param log string 26 | ---@param showMessageBox boolean 27 | function env.error(log, showMessageBox) end 28 | 29 | ---Prints the passed string to the dcs.log with a prefix of 'error'. The optional variable defines whether or not a message box will pop up when the logging occurs. 30 | ---https://wiki.hoggitworld.com/view/DCS_func_setErrorMessageBoxEnabled 31 | ---@example env.setErrorMessageBoxEnabled(false) 32 | ---@return function 33 | ---@param toggle boolean 34 | function env.setErrorMessageBoxEnabled(toggle) end 35 | 36 | ---Returns a string associated with the passed dictionary key value. If the key is not found within the miz the function will return the string that was passed. 37 | ---https://wiki.hoggitworld.com/view/DCS_func_getValueDictByKey 38 | ---@return string 39 | ---@param string string 40 | function env.getValueDictByKey(string) end -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DCS-Scripting-Library 2 | Provides a baseline Scripting Library for DCS for use in VS Code. This incudes Intellisense and auto code completion. You have the option to add other Environment by simply drag and droping the `.lua` file into the directory. What's unique about it is that you don't have to have other windows open or be imbeded in a project to access the features it provides. 3 | 4 | ![DSE Demo](https://cdn.discordapp.com/attachments/780381707794513931/941046816890294322/code3.gif) 5 | 6 | ## Features 7 | - [X] Intellisense 8 | - [X] Auto Code Completion 9 | - [X] Links to Documentation 10 | - [X] Singleton Functions 11 | - [X] env 12 | - [X] timer 13 | - [X] land 14 | - [X] atmosphere 15 | - [X] world 16 | - [X] coalition 17 | - [X] trigger 18 | - [X] coord 19 | - [X] missionCommands 20 | - [X] VoiceChat 21 | - [X] net 22 | - [X] Class Functions 23 | - [X] Object 24 | - [X] Scenery Object 25 | - [X] Coalition Object 26 | - [X] Unit 27 | - [X] Airbase 28 | - [X] Weapon 29 | - [X] Static Object 30 | - [X] Group 31 | - [X] Controller 32 | - [X] Spot 33 | - [ ] Enumerators 34 | - [ ] Server Functions 35 | - [ ] AI Tasks 36 | - [ ] Events 37 | 38 | ## Instructions 39 | - Download and install VS Code. https://code.visualstudio.com/download 40 | - Download the Lua Language Server by sumneko using the VS Code Extention feature. 41 | - Downlad this git. Extract the contents to a safe location. 42 | - Example: `F:\Github\DCS-Scripting-Library-main` 43 | - In the Lua Language Server by sumneko Extention settings scroll down near the bottom where it says "Lua > Workspace: Library". 44 | - Click "Add Item" and insert the folder path from above. 45 | - Example: `F:\Github\DCS-Scripting-Library-main` 46 | - ![image](https://user-images.githubusercontent.com/15984377/153274138-bdf52481-42d3-483c-b6b6-9fe32e78232a.png) 47 | - Open a new lua file. 48 | - Start typing `atmosphere` and you should see suggestions. 49 | - All done! 50 | 51 | ## Bonus 52 | You can add other libraries such as MIST, DCT, or CTLD by putting the .lua file in a "Lua > Workspace: Library" folder and then designating that folder as a library. 53 | 54 | ## Acknowledgements 55 | - Grimes via https://wiki.hoggitworld.com/view/Simulator_Scripting_Engine_Documentation 56 | - Hoggit Discord 57 | -------------------------------------------------------------------------------- /timer.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | 3 | ---The timer singleton has two important uses. 1. Return the mission time. 2. To schedule functions. 4 | ---https://wiki.hoggitworld.com/view/DCS_singleton_timer 5 | timer = {} 6 | 7 | ---Returns the model time in seconds to 3 decimal places. This counts time once the simulator loads. So if a mission is paused, the time this function returns still moves forward. 8 | ---https://wiki.hoggitworld.com/view/DCS_func_getTime 9 | ---@return any time 10 | function timer.getTime() end 11 | 12 | ---Returns the mission time in seconds. It is relative compared to the mission start time. The default mission start time in the mission editor is Day 1: 12:00:00. In seconds this value is: 43200 13 | ---https://wiki.hoggitworld.com/view/DCS_func_getAbsTime 14 | ---@return any time 15 | function timer.getAbsTime() end 16 | 17 | ---Returns the mission start time in seconds. Can be used with timer.getAbsTime() to see how much time has passed in the mission. 18 | ---https://wiki.hoggitworld.com/view/DCS_func_getTime0 19 | ---@return any time 20 | function timer.getTime0() end 21 | 22 | ---Schedules a function to run at a time in the future. This is a very powerful function. The function that is called is expected to return nil or a number which will indicate the next time the function will be rescheduled. Use the second argument in that function to retrieve the current time and add the desired amount of delay (expressed in seconds). 23 | ---https://wiki.hoggitworld.com/view/DCS_func_scheduleFunction 24 | ---@return any functionId 25 | ---@param functionToCall function 26 | ---@param anyFunctionArguement any functionArgs 27 | ---@param modelTime any time 28 | function timer.scheduleFunction(functionToCall, anyFunctionArguement, modelTime) end 29 | 30 | ---Removes a scheduled function as defined by the functionId from executing. Essentially will "destroy" the function. 31 | ---https://wiki.hoggitworld.com/view/DCS_func_removeFunction 32 | ---@return function 33 | ---@param functionId number 34 | function timer.removeFunction(functionId) end 35 | 36 | ---Re-Schedules an already scheduled function to run at a different time in the future. 37 | ---https://wiki.hoggitworld.com/view/DCS_func_setFunctionTime 38 | ---@return function 39 | ---@param functionId number 40 | ---@param modelTime any time 41 | function timer.setFunctionTime(functionId, modelTime) end 42 | 43 | return timer -------------------------------------------------------------------------------- /world.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | 3 | --- The world singleton contains functions centered around two different but extremely useful functions. 1. Events and event handlers are all governed within world.2. A number of functions to get information about the game world. 4 | ---https://wiki.hoggitworld.com/view/DCS_singleton_world 5 | world = {} 6 | 7 | --- Adds a function as an event handler that executes whenever a simulator event occurs. The most common uses of event handlers are to track statistics of units within a given scenario and to execute code based on certain events occurring. Handlers are passed event tables which contains numerous data regarding the event. For examples of the event tables returned, reference the event page on the wiki to get more information regarding the event. 8 | ---https://wiki.hoggitworld.com/view/DCS_func_addEventHandler 9 | ---@return function 10 | ---@param handler any EventHandler 11 | function world.addEventHandler(handler) end 12 | 13 | ---Removes the specified event handler from handling events. Use this when an event handler has outlived its usefulness. 14 | ---https://wiki.hoggitworld.com/view/DCS_func_removeEventHandler 15 | ---@return function 16 | ---@param handler any EventHandler 17 | function world.removeEventHandler(handler) end 18 | 19 | ---Returns a table of the single unit object in the game who's skill level is set as "Player". There is only a single player unit in a mission and in single player the user will always spawn into this unit automatically unless other client or Combined Arms slots are available. 20 | ---https://wiki.hoggitworld.com/view/DCS_func_getPlayer 21 | ---@return table 22 | function world.getPlayer() end 23 | 24 | ---Searches a defined volume of 3d space for the specified objects within it and then can run function on each returned object. Object category is either a single enum or a table of enums that defines the types of objects that will be searched for Search volume is the defined 3d space that will be searched. Handler is the function that will be run on each object that is found. Any data is a variable that is passed to the handler function, it can be anything. 25 | ---https://wiki.hoggitworld.com/view/DCS_func_searchObjects 26 | ---@return table 27 | ---@param ObjectCategory table/enum 28 | ---@param searchVolume any volume 29 | ---@param Handler any ObjectSeatchHandler 30 | ---@param data any 31 | function world.searchObjects(ObjectCategory, searchVolume, Handler, data) end 32 | 33 | ---Returns a table of mark panels and drawn shapes indexed numerically that are present within the mission. Panel is designed with the mark points in mind, but still returns data for shapes created via markups. 34 | ---https://wiki.hoggitworld.com/view/DCS_func_getMarkPanels 35 | ---@return table 36 | function world.getMarkPanels() end 37 | 38 | return world -------------------------------------------------------------------------------- /net.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | 3 | ---The net singleton are a number of functions from the network API that work in the mission scripting environment. Notably for mission scripting purposes there is now a way to send chat, check if players are in Combined Arms slots, kick people from the server, and move players to certain slots. 4 | ---https://wiki.hoggitworld.com/view/DCS_singleton_net 5 | net = {} 6 | 7 | ---Sends a chat message. 8 | ---https://wiki.hoggitworld.com/view/DCS_func_send_chat 9 | ---@param message string 10 | ---@param all boolean 11 | function net.send_chat(message, all) end 12 | 13 | ---Sends a chat message to the player with the passed id. If the optional from Id is set then the player will appear to receive a message from that player. 14 | ---https://wiki.hoggitworld.com/view/DCS_func_send_chat_to 15 | ---@param message string 16 | ---@param playerId number 17 | ---@param fromId number 18 | function net.send_chat_to(message, playerId, fromId) end 19 | 20 | ---Loads the specified mission. 21 | ---https://wiki.hoggitworld.com/view/DCS_func_load_mission 22 | ---@return boolean 23 | ---@param fileName string 24 | function net.load_mission(fileName) end 25 | 26 | ---Load the next mission from the server mission list. Returns false if at the end of list. 27 | ---https://wiki.hoggitworld.com/view/DCS_func_load_next_mission 28 | ---@return boolean 29 | function net.load_next_mission() end 30 | 31 | ---Returns a table of players currently connected to the server. 32 | ---https://wiki.hoggitworld.com/view/DCS_func_get_player_list 33 | ---@return table 34 | function net.get_player_list() end 35 | 36 | ---Returns the playerID of the local player. Always returns 1 for server. 37 | ---https://wiki.hoggitworld.com/view/DCS_func_get_my_player_id 38 | ---@return number 39 | function net.get_my_player_id() end 40 | 41 | ---Returns the playerID of the server. Currently always 1. 42 | ---https://wiki.hoggitworld.com/view/DCS_func_get_server_id 43 | ---@return number 44 | function net.get_server_id() end 45 | 46 | ---Returns a table of attributes for a given playerId. If optional attribute present only that value is returned Attributes: 47 | ---https://wiki.hoggitworld.com/view/DCS_func_get_player_info 48 | ---@return table 49 | ---@param playerID number 50 | ---@param attribute string 51 | function net.get_player_info(playerID, attribute) end 52 | 53 | ---Kicks a player from the server. Can display a message to the user. 54 | ---https://wiki.hoggitworld.com/view/DCS_func_kick 55 | ---@return boolean 56 | ---@param playerID number 57 | ---@param message string 58 | function net.kick(playerID, message) end 59 | 60 | ---Returns a statistic from a given player. Last arg is optional. Attributes: 61 | ---https://wiki.hoggitworld.com/view/DCS_func_get_stat 62 | ---@return number 63 | ---@param playerID number 64 | ---@param statID number 65 | function net.get_stat(playerID, statID) end 66 | 67 | ---Returns the name of a given player. Is the same as net.get_player_info(playerID, 'name') 68 | ---https://wiki.hoggitworld.com/view/DCS_func_get_name 69 | ---@return string 70 | ---@param playerID number 71 | function net.get_name(playerID) end 72 | 73 | ---Returns the sideId and slotId of a given player. Is the same as net.get_player_info(playerID, 'side') and net.get_player_info(playerID, 'slot') 74 | ---https://wiki.hoggitworld.com/view/DCS_func_get_slot 75 | ---@return number, number 76 | ---@param playerID number 77 | function net.get_slot(playerID) end 78 | 79 | ---Converts a lua value to a JSON string. 80 | ---https://wiki.hoggitworld.com/view/DCS_func_lua2json 81 | ---@return table 82 | ---@param lua any 83 | function net.lua2json(lua) end 84 | 85 | ---Converts a JSON string to a lua value. 86 | ---https://wiki.hoggitworld.com/view/DCS_func_json2lua 87 | ---@return table 88 | ---@param json string 89 | function net.json2lua(json) end 90 | 91 | ---Executes a lua string in a given lua environment in the game. 92 | ---https://wiki.hoggitworld.com/view/DCS_func_dostring_in 93 | ---@return string 94 | ---@param state string 95 | ---@param dostring string 96 | function net.dostring_in(state, dostring) end 97 | 98 | return net 99 | -------------------------------------------------------------------------------- /land.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | 3 | --- The land singleton contains functions used to get information about the terrain geometry of a given map. Functions include getting data on the type and height of terrain at a specific points and raytracing functions. 4 | ---https://wiki.hoggitworld.com/view/DCS_singleton_land 5 | land = {} 6 | 7 | ---Returns the distance from sea level (y-axis) of a given vec2 point. 8 | ---https://wiki.hoggitworld.com/view/DCS_func_getHeight 9 | --- 10 | ---The following example with convert a vec3 point lacking y-axis data to a vec3 point at ground level. 11 | --- 12 | ---newPoint= {x = point.x, y = land.getHeight({x = point.x, y = point.z}), z= point.z} 13 | ---@return number 14 | ---@param vec2 table 15 | function land.getHeight(vec2) end 16 | 17 | ---Returns the surface height and depth of a point. Useful for checking if the path is deep enough to support a given ship. Both values are positive. When checked over water at sea level the first value is always zero. When checked over water at altitude, for example the reservoir of the Inguri Dam, the first value is the corresponding altitude the water level is at. 18 | ---https://wiki.hoggitworld.com/view/DCS_func_getSurfaceHeightWithSeabed 19 | --- 20 | ---The following will return a value of the depth at a trigger zone named thors twins. 21 | --- 22 | ---local p = trigger.action.getZone("thors twins").point 23 | --- 24 | ---local alt, depth = land.getSurfaceHeightWithSeabed({x = p.x, y = p.z}) 25 | ---@return number, number 26 | ---@param vec2 table 27 | function land.getSurfaceHeightWithSeabed(vec2) end 28 | 29 | ---Returns an enumerator for the surface type at a given point. 30 | ---https://wiki.hoggitworld.com/view/DCS_func_getSurfaceType 31 | ---@return any enum 32 | ---@param vec2 table 33 | function land.getSurfaceType(vec2) end 34 | 35 | ---Returns the boolean value if there is an terrain intersection via drawing a virtual line from the origin to the destination. Used for determining line of sight. 36 | ---https://wiki.hoggitworld.com/view/DCS_func_isVisible 37 | ---@return boolean 38 | ---@param origin table 39 | ---@param destination table 40 | function land.isVisible(origin, destination) end 41 | 42 | ---Returns an intercept point at which a ray drawn from the origin in the passed normalized direction for a specified distance. If no intersection found the function will return nil. 43 | ---https://wiki.hoggitworld.com/view/DCS_func_getIP 44 | ---@return any vec3 45 | ---@param origin table 46 | ---@param direction table 47 | ---@param distance number 48 | function land.getIP(origin, direction, distance) end 49 | 50 | ---Returns a table of vectors that make up the profile of the land between the two passed points. The spacing and quantity of returned vectors is not entirely known to the author. Requires further testing. 51 | ---https://wiki.hoggitworld.com/view/DCS_func_profile 52 | ---@return any table table of vec3 53 | ---@param vec3 table 54 | ---@param vec3 table 55 | function land.profile(vec3, vec3) end 56 | 57 | ---Returns a coordinate of the nearest road from the passed point. NOTE that this function does not use vec2 or vec3. It uses individual values representing a vec2 for x and y. Valid road type values: 'roads' and 'railroads' 58 | ---https://wiki.hoggitworld.com/view/DCS_func_getClosestPointOnRoads 59 | ---@return number, number 60 | ---@param roadType string 61 | ---@param xCoord number 62 | ---@param yCoord number 63 | function land.getClosestPointOnRoads(roadType, xCoord, yCoord) end 64 | 65 | ---Returns a table of points along a that define a route from a starting point to a destination point. Returned table is a table of vec2 points indexed numerically from starting point to destination. Table can return a high number of points over a relatively short route. So expect to iterate through a large number of values. Roadtype can be 'railroads' or 'roads' NOTE!!! A bug exists where the value for railroads is actually 'rails'. This is different from the sister function getClosestPointOnRoads! 66 | ---https://wiki.hoggitworld.com/view/DCS_func_findPathOnRoads 67 | ---@return table 68 | ---@param roadType string 69 | ---@param xCoord number 70 | ---@param yCoord number 71 | ---@param destX number 72 | ---@param destY number 73 | function land.findPathOnRoads(roadType, xCoord, yCoord, destX, destY) end 74 | 75 | return land -------------------------------------------------------------------------------- /enums.lua: -------------------------------------------------------------------------------- 1 | ---A list of enums in DCS for reference. 2 | enum = {} 3 | attributes = {} 4 | 5 | enum.goaltype = { 6 | ["INVALID"] = 0, 7 | ["DAMAGE"] = 1, 8 | ["MAX"] = 2, 9 | } 10 | 11 | enum.objtype = { 12 | ["INVALID"] = 0, 13 | ["UNIT"] = 1, 14 | ["STATIC"] = 2, 15 | ["GROUP"] = 3, 16 | ["SCENERY"] = 4, 17 | ["MAX"] = 4, 18 | } 19 | 20 | enum.priority = { 21 | ["INVALID"] = 0, 22 | ["PRIMARY"] = 1, 23 | ["SECONDARY"] = 2, 24 | ["MAX"] = 3, 25 | } 26 | 27 | attributes.net.get_player_info = { 28 | ["id"] = "playerID", 29 | ["name"] = "player name", 30 | ["side"] = "0 - spectators, 1 - red, 2 - blue", 31 | ["slot"] = "slotID of the player or", 32 | ["ping"] = "ping of the player in ms", 33 | ["ipaddr"] = "IP address of the player, SERVER ONLY", 34 | ["ucid"] = "Unique Client Identifier, SERVER ONLY", 35 | } 36 | ---The country enumerator contains the constant countryIds and strings for each country present in DCS World. Country ids are indexed starting at 0. 37 | ---https://wiki.hoggitworld.com/view/DCS_enum_country 38 | ---TODO: 39 | enum.country = {} 40 | 41 | ---The AI table contains a list of constants for Options, Tasks, and Skills. 42 | ---https://wiki.hoggitworld.com/view/DCS_enum_AI 43 | ---TODO: 44 | enum.AI = {} 45 | 46 | ---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 47 | ---https://wiki.hoggitworld.com/view/DCS_enum_world 48 | ---TODO: 49 | enum.world = {} 50 | 51 | ---The radio enumerator has a single table that defines the radio modulation used to transmit. 52 | ---https://wiki.hoggitworld.com/view/DCS_enum_radio 53 | ---TODO: 54 | enum.radio = {} 55 | 56 | ---The trigger enumerator contains data for the color of smoke and flares that can be deployed as trigger actions. 57 | ---https://wiki.hoggitworld.com/view/DCS_enum_trigger 58 | ---TODO: 59 | enum.trigger = {} 60 | 61 | ---The coalition enumerators define the available coalitions and services offered within those coalitions. 62 | ---https://wiki.hoggitworld.com/view/DCS_enum_coalition 63 | ---TODO: 64 | enum.coalition = {} 65 | 66 | --- The Weapon enumerator contains tables used to identify the capabilities and types of a particular weapon. Additionally the Weapon.flag table is large table that defines every category of weapon. Weapon.flag information is available in its own article. 67 | ---https://wiki.hoggitworld.com/view/DCS_enum_weapon 68 | ---TODO: 69 | enum.weapon = {} 70 | 71 | ---Callsigns assigned to units are given numeric values. The game features two forms of callsigns, but in the files both are defined strictly as numbers. Russian style callsigns all use 3 digit numbers: 903, 420, 018 NATO has a "callname, number, flightmember" style: Uzi 1-1, Hawg 8-1 72 | ---https://wiki.hoggitworld.com/view/DCS_enum_callsigns 73 | ---TODO: 74 | enum.callsigns = {} 75 | 76 | ---Formations are a set of numbers to define different formations aircraft and helicopter groups may use. Like callsigns the formation values are another set of constant values that are not directly accessible by the scripting engine. 77 | ---https://wiki.hoggitworld.com/view/DCS_enum_formation 78 | ---TODO: 79 | enum.formation = {} 80 | 81 | --- Attributes act as a list of properties of a given unit. These attributes can be used to quickly identify generalized properties for whatever scripts you have in mind. 82 | ---https://wiki.hoggitworld.com/view/DCS_enum_attributes 83 | ---TODO: 84 | enum.attributes = {} 85 | 86 | enum.land.SurfaceType = { 87 | ["LAND"] = 1, 88 | ["SHALLOW_WATER"] = 2, 89 | ["WATER"] = 3, 90 | ["ROAD"] = 4, 91 | ["RUNWAY"] = 5, 92 | } 93 | 94 | attributes.net.get_stat = { 95 | ["net.PS_PING"] = "ping (in ms)", 96 | ["net.PS_CRASH"] = "number of crashes", 97 | ["net.PS_CAR"] = "number of destroyed vehicles", 98 | ["net.PS_PLANE"] = "number of destroyed planes/helicopters", 99 | ["net.PS_SHIP"] = "number of destroyed ships", 100 | ["net.PS_SCORE"] = "total score", 101 | ["net.PS_LAND"] = "number of landings", 102 | ["net.PS_EJECT"] = "of ejects", 103 | } 104 | 105 | enum.Controller.Detection = { 106 | ["VISUAL"] = 1, 107 | ["OPTIC"] = 2, 108 | ["RADAR"] = 4, 109 | ["IRST"] = 8, 110 | ["RWR"] = 16, 111 | ["DLINK"] = 32 112 | } 113 | 114 | enum.Spot.Category = { 115 | "INFRA_RED", 116 | "LASER" 117 | } -------------------------------------------------------------------------------- /missionCommands.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | 3 | ---The missionCommands singleton allows for greater access and flexibility of use for the F10 Other radio menu. Added commands can contain sub-menus and directly call lua functions. 4 | ---https://wiki.hoggitworld.com/view/DCS_singleton_missionCommands 5 | missionCommands = {} 6 | 7 | ---Adds a command to the "F10 Other" radio menu allowing players to run specified scripting functions. Command is added for both teams. The string name is the text that will be displayed in the F10 Other menu and is also used in the function to remove the command from the menu. Path is an optional value that defines whether or not the command will be in a named submenu. FunctionToCall is the name of the function, with the optional argument value designating any passed values. 8 | ---https://wiki.hoggitworld.com/view/DCS_func_addCommand 9 | ---@return table 10 | ---@param name string 11 | ---@param path table or nil 12 | ---@param functionToRun function 13 | ---@param anyArguement any 14 | function missionCommands.addCommand(name, path, functionToRun, anyArguement) end 15 | 16 | --- Creates a submenu of a specified name for all players. Can be used to create nested sub menues. If the path is not specified, submenu is added to the root menu. 17 | ---https://wiki.hoggitworld.com/view/DCS_func_addSubMenu 18 | ---@return table 19 | ---@param name string 20 | ---@param path table 21 | function missionCommands.addSubMenu(name, path) end 22 | 23 | ---Removes the item of the specified path from the F10 radio menu for all. If the value is nil all items will be removed from the radio menu. If the path given is a submenu then all items nested within will be removed. 24 | ---https://wiki.hoggitworld.com/view/DCS_func_removeItem 25 | ---@return nil nothing nothing 26 | ---@param path table table or nil 27 | function missionCommands.removeItem(path) end 28 | 29 | ---Adds a command to the "F10 Other" radio menu allowing players to run specified scripting functions. Command is added for the specified coalition. The string name is the text that will be displayed in the F10 Other menu and is also used in the function to remove the command from the menu. Path is an optional value that defines whether or not the command will be in a named submenu. FunctionToCall is the name of the function, with the optional argument value designating any passed values. 30 | ---https://wiki.hoggitworld.com/view/DCS_func_addCommandForCoalition 31 | ---@return table 32 | ---@param coalitionSide any enum 33 | ---@param name string 34 | ---@param path table table or nil 35 | ---@param functionToRun function 36 | ---@param anyArguement any 37 | function missionCommands.addCommandForCoalition(coalitionSide, name, path, functionToRun, anyArguement) end 38 | 39 | ---Creates a submenu of a specified name for the specified coalition. Can be used to create nested sub menues. If the path is not specified, submenu is added to the root menu. 40 | ---https://wiki.hoggitworld.com/view/DCS_func_addSubMenuForCoalition 41 | ---@return table 42 | ---@param coalitionSide any enum 43 | ---@param name string 44 | function missionCommands.addSubMenuForCoalition(coalitionSide, name) end 45 | 46 | ---Removes the item of the specified path from the F10 radio menu for the specified coalition. If the value is nil all items will be removed from the radio menu. 47 | ---https://wiki.hoggitworld.com/view/DCS_func_removeItemForCoalition 48 | ---@return function 49 | ---@param coalitionSide any enum 50 | ---@param path table table or nil 51 | function missionCommands.removeItemForCoalition(coalitionSide, path) end 52 | 53 | ---Adds a command to the "F10 Other" radio menu allowing players to run specified scripting functions. Command is added for the specified groupId. The string name is the text that will be displayed in the F10 Other menu and is also used in the function to remove the command from the menu. Path is an optional value that defines whether or not the command will be in a named submenu. FunctionToCall is the name of the function, with the optional argument value designating any passed values. 54 | ---https://wiki.hoggitworld.com/view/DCS_func_addCommandForGroup 55 | ---@return table 56 | ---@param groupId number 57 | ---@param name string 58 | ---@param path table table or nil 59 | ---@param functionToRun function 60 | ---@param anyArguement any 61 | function missionCommands.addCommandForGroup(groupId, name, path, functionToRun, anyArguement) end 62 | 63 | ---Creates a submenu of a specified name for the specified group. Can be used to create nested sub menues. If the path is not specified, submenu is added to the root menu. 64 | ---https://wiki.hoggitworld.com/view/DCS_func_addSubMenuForGroup 65 | ---@return table 66 | ---@param groupId number 67 | ---@param name string 68 | ---@param path table 69 | function missionCommands.addSubMenuForGroup(groupId, name, path) end 70 | 71 | ---Removes the item of the specified path from the F10 radio menu for the specified group. If the value is nil all items will be removed from the radio menu. 72 | ---https://wiki.hoggitworld.com/view/DCS_func_removeItemForGroup 73 | ---@return function 74 | ---@param groupId number 75 | ---@param path table table or nil 76 | function missionCommands.removeItemForGroup(groupId, path) end 77 | 78 | return missionCommands -------------------------------------------------------------------------------- /coalition.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | 3 | ---The coalition singleton contains functions that gets information on the all of the units within the mission. It also has two of the most powerful functions that are capable of spawning groups and static objects into the mission. 4 | ---https://wiki.hoggitworld.com/view/DCS_singleton_coalition 5 | coalition = {} 6 | 7 | 8 | ---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 country page and 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. If the group or any unit within shares a name of an existing group or unit, the existing group or unit will be destroyed when the new group is created. Function can NOT spawn new aircraft with a skill level of "client". However in single player a group can be spawned with the skill level of "Player". When this occurs the existing player aircraft will be destroyed. If no groupId or unitId is specified or the Ids are shared with existing groups or units, a new Id will be created for the new group. 9 | ---https://wiki.hoggitworld.com/view/DCS_func_addGroup 10 | ---@return any Group 11 | ---@param countryId any 12 | ---@param groupCategory any 13 | ---@param groupData table 14 | function coalition.addGroup(countryId, groupCategory, groupData) end 15 | 16 | ---Dynamically spawns a static object belonging to the specified country into the mission. This function follows the same rules as coalition.addGroup except for the object table not perfectly matching the format of a static object as seen in the mission file. Static Objects name cannot be shared with an existing object, if it is the existing object will be destroyed on the spawning of the new object. - If unitId is not specified or matches an existing object, a new Id will be generated. - Coalition of the object is defined based on the country the object is spawning to. 17 | ---https://wiki.hoggitworld.com/view/DCS_func_addStaticObject 18 | ---@return any StaticObject 19 | ---@param countryId any 20 | ---@param groupData table 21 | function coalition.addGroup(countryId, groupData) end 22 | 23 | ---Dynamically spawns a static object belonging to the specified country into the mission. This function follows the same rules as coalition.addGroup except for the object table not perfectly matching the format of a static object as seen in the mission file. Static Objects name cannot be shared with an existing object, if it is the existing object will be destroyed on the spawning of the new object. - If unitId is not specified or matches an existing object, a new Id will be generated. - Coalition of the object is defined based on the country the object is spawning to. 24 | ---https://wiki.hoggitworld.com/view/DCS_func_addStaticObject 25 | ---@return any StaticObject 26 | ---@param countryId any 27 | ---@param groupData table 28 | function coalition.addStaticObject(countryId, groupData) end 29 | 30 | ---Returns a table of group objects belonging to the specified coalition. If the groupCategory enumerator is provided the table will only contain groups that belong to the specified category. If this optional variable is not provided, all group types will be returned. See here for the list of possible group categories. 31 | ---https://wiki.hoggitworld.com/view/DCS_func_getGroups 32 | ---@return table 33 | ---@param coalitionId any 34 | ---@param GroupCategory any 35 | function coalition.getGroups(coalitionId, GroupCategory) end 36 | 37 | 38 | ---Returns a table of static objects belonging to the specified coalition. 39 | --https://wiki.hoggitworld.com/view/DCS_func_getStaticObjects 40 | ---@return table 41 | ---@param coalitionId any 42 | function coalition.getStaticObjects(coalitionId ) end 43 | 44 | 45 | ---Returns a table of airbase objects belonging to the specified coalition. Objects can be ships, static objects(FARP), or airbases on the map. When the function is run as world.getAirbases() no input values required, and the function returns all airbases, ships, and farps on the map. 46 | ---https://wiki.hoggitworld.com/view/DCS_func_getAirbases 47 | ---@param coalitionId any 48 | ---@return table 49 | function coalition.getAirbases(coalitionId) end 50 | 51 | ---Returns a table of unit objects that are currently occupied by players. Function is useful in multiplayer to easily filter client aircraft from everything else. 52 | ---https://wiki.hoggitworld.com/view/DCS_func_getPlayers 53 | ---@param coalitionId any 54 | ---@return table 55 | function coalition.getPlayers(coalitionId) end 56 | 57 | ---Returns a table of unit objects that provide a given service to player controlled aircraft. Services are ATC, AWACS, TANKER, and FAC. 58 | ---coalition.service 59 | ---https://wiki.hoggitworld.com/view/DCS_func_getServiceProviders 60 | ---@param coalitionId any 61 | ---@param coalitionService any 62 | ---@return table 63 | function coalition.getServiceProviders(coalitionId , coalitionService) end 64 | 65 | ---Creates a new reference point belonging to the specified coalition. Reference points are used by JTACs. 66 | ---https://wiki.hoggitworld.com/view/DCS_func_addRefPoint 67 | ---@param coalitionId any 68 | ---@param refPoint table 69 | ---@return function 70 | function coalition.addRefPoints(coalitionId , refPoint) end 71 | 72 | ---Returns a table of reference points as defined by the mission editor or added via scripting. Reference points are used by JTACs. 73 | ---@param coalitionId any 74 | ---@return table 75 | function coalition.getRefPoints(coalitionId) end 76 | 77 | ---Returns the position of a coalitions "bullseye" as specified in the mission editor. 78 | ---@param coalitionId any 79 | ---@return table vec3 80 | function coalition.getMainRefPoint(coalitionId) end 81 | 82 | ---Returns the enumarator coalitionId that a specified country belongs to. 83 | ---@param countryId any 84 | ---@return any enumCoalitonId 85 | function coalition.getCountryCoalition(countryId) end -------------------------------------------------------------------------------- /trigger.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | 3 | ---The trigger singleton contains a number of functions that mimic actions and conditions found within the mission editor triggers. As a result these functions provide an easy way to interface with triggers setup within the mission editor. Additionally a few trigger functions act as a gateway between mission editor triggers and related scripting functions. 4 | ---https://wiki.hoggitworld.com/view/DCS_singleton_trigger 5 | trigger = {} 6 | 7 | ---The trigger singleton contains a number of functions that mimic actions and conditions found within the mission editor triggers. As a result these functions provide an easy way to interface with triggers setup within the mission editor. Additionally a few trigger functions act as a gateway between mission editor triggers and related scripting functions. 8 | ---https://wiki.hoggitworld.com/view/DCS_singleton_trigger 9 | trigger.action = {} 10 | 11 | ---Creates a smoke plume behind a specified aircraft. When passed 0 for smoke type the plume will be disabled. When triggering the on the same unit with a different color the plume will simply change color. Optional value for altitude can be set. This value is in meters and defines the altitude at which the aircraft must be for the smoke to dispense. If the aircraft goes below that altitude the smoke will stop. As long as the smoke is enabled the toggling on/off by changing altitude is automated. 12 | ---https://wiki.hoggitworld.com/view/DCS_func_ctfColorTag 13 | ---@Example The following creates a blue smoke plume on an aircraft named "IWishEDWouldDocumentFeaturesMore" that will be enabled as long as the aircraft is above 1000 meters. 14 | ---trigger.action.ctfColorTag('IWishEDWouldDocumentFeaturesMore', 5, 1000) 15 | ---@return function 16 | ---@param unitName string 17 | ---@param smokeColor any 18 | ---@param altitude number 19 | function trigger.action.ctfColorTag(unitName, smokeColor, altitude) end 20 | 21 | ---Returns the value of a user flag. 22 | ---https://wiki.hoggitworld.com/view/DCS_func_getUserFlag 23 | ---@return number 24 | ---@param flagNumFlagName string 25 | function trigger.action.getUserFlag(flagNumFlagName) end 26 | 27 | ---Sets a user flag to the specified value. 28 | ---https://wiki.hoggitworld.com/view/DCS_func_setUserFlag 29 | ---@return function 30 | ---@param flagNumFlagName string 31 | ---@param userFlagValue boolean boolean or number 32 | function trigger.action.setUserFlag(flagNumFlagName, userFlagValue) end 33 | 34 | ---Returns a trigger zone table of a given name 35 | ---https://wiki.hoggitworld.com/view/DCS_func_getZone 36 | ---@return table 37 | ---@param zoneName string 38 | function trigger.action.getZone(zoneName) end 39 | 40 | ---Creates an explosion at a given point at the specified power. 41 | ---https://wiki.hoggitworld.com/view/DCS_func_explosion 42 | ---@return function 43 | ---@param vec3 table 44 | ---@param power number 45 | function trigger.action.explosion(vec3, power) end 46 | 47 | ---Creates colored smoke marker at a given point. Smoke uses trigger.smokeColor enum 48 | ---https://wiki.hoggitworld.com/view/DCS_func_smoke 49 | ---@return function 50 | ---@param vec3 table 51 | ---@param smokeColor any 52 | function trigger.action.smoke(vec3, smokeColor) end 53 | 54 | ---Creates a large smoke effect on a vec3 point of a specified type and density. 55 | ---1 = small smoke and fire 56 | ---2 = medium smoke and fire 57 | ---3 = large smoke and fire 58 | ---4 = huge smoke and fire 59 | ---5 = small smoke 60 | ---6 = medium smoke 61 | ---7 = large smoke 62 | ---8 = huge smoke 63 | ---Density is any value from 0 to 1. For example 0.5. Name is a unique name given to the smoke mark to be used with removing it. 64 | ---https://wiki.hoggitworld.com/view/DCS_func_effectSmokeBig 65 | ---@return function 66 | ---@param vec3 table 67 | ---@param smokePreset any 68 | ---@param density number 69 | ---@param name string 70 | function trigger.action.effectSmokeBig(vec3, smokePreset, density, name) end 71 | 72 | 73 | ---Stops a big smoke effect of the passed name. Used in conjunction with trigger.action.effectSmokeBig 74 | ---https://wiki.hoggitworld.com/view/DCS_func_effectSmokeStop 75 | ---@return function 76 | ---@param name string 77 | function trigger.action.effectSmokeStop(name) end 78 | 79 | ---Creates an illumination bomb at the specified point. y variable defines the altitude at which the bomb will appear at. The illumination bomb will burn for 300 seconds (5 minutes). Additionally the bomb will fall toward the ground, so a minimum altitude is required to get the full illumination time. The power is a value between 1 and 1000000. 80 | ---https://wiki.hoggitworld.com/view/DCS_func_illuminationBomb 81 | ---@return function 82 | ---@param vec3 table 83 | ---@param power number 84 | function trigger.action.illuminationBomb(vec3, power) end 85 | 86 | ---Creates a signal flare at the given point in the specified color. The flare will be launched in the direction of the azimuth variable. 87 | ---https://wiki.hoggitworld.com/view/DCS_func_signalFlare 88 | ---@return function 89 | ---@param vec3 table 90 | ---@param flareColor any 91 | ---@param azimuth number 92 | function trigger.action.signalFlare(vec3, flareColor, azimuth) end 93 | 94 | 95 | ---Transmits an audio file to be broadcast over a specific frequency eneminating from the specified point. 96 | ---Modulation Values: 97 | ---https://wiki.hoggitworld.com/view/DCS_func_radioTransmission 98 | ---@return function 99 | ---@param filename string 100 | ---@param point table 101 | ---@param modulation any 102 | ---@param loop boolean 103 | ---@param frequency number 104 | ---@param power number 105 | ---@param name string 106 | function trigger.action.radioTransmission(filename, point, modulation, loop, frequency, power, name) end 107 | 108 | ---Stops a radio transmission of the passed name. Transmission must be named in the trigger.action.radioTransmission it was sent from. 109 | ---https://wiki.hoggitworld.com/view/DCS_func_stopRadioTransmission 110 | ---@return function 111 | ---@param name string 112 | function trigger.action.stopRadioTransmission(name) end 113 | 114 | ---Sets the internal cargo for the specified unit at the specified mass. Overrides any previously set value. Can be used in conjunction with troop transport to simulate cargo being added to the aircraft. Can be used on any unit object, however it only will impact airplanes and helicopters. Mass is defined in kilograms. 115 | ---https://wiki.hoggitworld.com/view/DCS_func_setUnitInternalCargo 116 | ---@return function 117 | ---@param unitName string 118 | ---@param mass number 119 | function trigger.action.setUnitInternalCargo(unitName, mass) end 120 | 121 | --- Plays a sound file to all players. The sound file must be placed inside of the miz file in order to be played. 122 | ---https://wiki.hoggitworld.com/view/DCS_func_outSound 123 | ---@return function 124 | ---@param soundfile string 125 | function trigger.action.outSound(soundfile) end 126 | 127 | ---Plays a sound file to all players on the specified coalition. The sound file must be placed inside of the miz file in order to be played. 128 | ---https://wiki.hoggitworld.com/view/DCS_func_outSoundForCoalition 129 | ---@return function 130 | ---@param coalition any 131 | ---@param soundfile string 132 | function trigger.action.outSoundForCoalition(coalition, soundfile) end 133 | 134 | ---Plays a sound file to all players on the specified country. The sound file must be placed inside of the miz file in order to be played. 135 | ---https://wiki.hoggitworld.com/view/DCS_func_outSoundForCountry 136 | ---@return function 137 | ---@param country any 138 | ---@param soundfile string 139 | function trigger.action.outSoundForCountry(country, soundfile) end 140 | 141 | ---Plays a sound file to all players in the specified group. Group is specified by their groupId. The sound file must be placed inside of the miz file in order to be played. 142 | ---https://wiki.hoggitworld.com/view/DCS_func_outSoundForGroup 143 | ---@return function 144 | ---@param groupId number 145 | ---@param soundfile string 146 | function trigger.action.outSoundForGroup(groupId, soundfile) end 147 | 148 | ---Displays the passed string of text for the specified time to all players. Boolean clearview defines whether or not to use the old message display format. The old message display overwrites existing messages and is good for displaying anything that must be updated at a high rate like lap times. 149 | ---https://wiki.hoggitworld.com/view/DCS_func_outText 150 | ---@return function 151 | ---@param text string 152 | ---@param displayTime number 153 | ---@param clearview boolean 154 | function trigger.action.outText(text, displayTime, clearview) end 155 | 156 | ---Displays the passed string of text for the specified time to all players belonging to the specified coalition. Boolean clearview defines whether or not to use the old message display format. The old message display overwrites existing messages and is good for displaying anything that must be updated at a high rate like lap times. 157 | ---https://wiki.hoggitworld.com/view/DCS_func_outTextForCoalition 158 | ---@return function 159 | ---@param coalition any 160 | ---@param text string 161 | ---@param displayTime number 162 | ---@param clearview boolean 163 | function trigger.action.outTextForCoalition(coalition, text, displayTime, clearview) end 164 | 165 | ---Displays the passed string of text for the specified time to all players belonging to the specified country. Boolean clearview defines whether or not to use the old message display format. The old message display overwrites existing messages and is good for displaying anything that must be updated at a high rate like lap times. 166 | ---https://wiki.hoggitworld.com/view/DCS_func_outTextForCountry 167 | ---@return function 168 | ---@param country any 169 | ---@param text string 170 | ---@param displayTime number 171 | ---@param clearview boolean 172 | function trigger.action.outTextForCountry(country, text, displayTime, clearview) end 173 | 174 | ---Displays the passed string of text for the specified time to all players in the specified group. The group is defined by its groupId. Boolean clearview defines whether or not to use the old message display format. The old message display overwrites existing messages and is good for displaying anything that must be updated at a high rate like lap times. 175 | ---https://wiki.hoggitworld.com/view/DCS_func_outTextForGroup 176 | ---@return function 177 | ---@param groupId number 178 | ---@param text string 179 | ---@param displayTime number 180 | ---@param clearview boolean 181 | function trigger.action.outTextForGroup(groupId, text, displayTime, clearview) end 182 | 183 | 184 | ---Adds a command to the "F10 Other" radio menu allowing players to call commands and set flags within the mission. Command is added for both teams. The string name is the text that will be displayed in the F10 Other menu and is also used in the function to remove the command from the menu. 185 | ---https://wiki.hoggitworld.com/view/DCS_func_addOtherCommand 186 | ---@return function 187 | ---@param name string 188 | ---@param userFlagName string 189 | ---@param userFlagValue number 190 | function trigger.action.addOtherCommand(name, userFlagName, userFlagValue) end 191 | 192 | ---Removes the command that matches the specified name input variable from the "F10 Other" radio menu. 193 | ---https://wiki.hoggitworld.com/view/DCS_func_removeOtherCommand 194 | ---@return function 195 | ---@param name string 196 | function trigger.action.removeOtherCommand(name) end 197 | 198 | ---Adds a command to the "F10 Other" radio menu allowing players to call commands and set flags within the mission. Command is added for all players belonging to the specified coalition. The string name is the text that will be displayed in the F10 Other menu and is also used in the function to remove the command from the menu. 199 | ---https://wiki.hoggitworld.com/view/DCS_func_addOtherCommandForCoalition 200 | ---@return function 201 | ---@param coalition any 202 | ---@param name string 203 | ---@param userFlagName string 204 | ---@param userFlagValue number 205 | function trigger.action.addOtherCommandForCoalition(coalition, name, userFlagName, userFlagValue) end 206 | 207 | ---Removes the command that matches the specified name input variable from the "F10 Other" radio menu if the command was added for coalition. 208 | ---https://wiki.hoggitworld.com/view/DCS_func_removeOtherCommandForCoalition 209 | ---@return function 210 | ---@param coalitionId any 211 | ---@param name string 212 | function trigger.action.removeOtherCommandForCoalition(coalitionId, name) end 213 | 214 | ---https://wiki.hoggitworld.com/view/DCS_func_addOtherCommandForGroup 215 | ---Adds a command to the "F10 Other" radio menu allowing players to call commands and set flags within the mission. Command is added for a specific group designated by its groupId. The string name is the text that will be displayed in the F10 Other menu and is also used in the function to remove the command from the menu. 216 | ---@return function 217 | ---@param groupId number 218 | ---@param name string 219 | ---@param userFlagName string 220 | ---@param userFlagValue number 221 | function trigger.action.addOtherCommandForGroup(groupId, name, userFlagName, userFlagValue) end 222 | 223 | ---Removes the command that matches the specified name input variable from the "F10 Other" radio menu if the command exists for the specified group. 224 | ---https://wiki.hoggitworld.com/view/DCS_func_removeOtherCommandForGroup 225 | ---@return function 226 | ---@param groupId number 227 | ---@param name string 228 | function trigger.action.removeOtherCommandForGroup(groupId, name) end 229 | 230 | --- Adds a mark point to all on the F10 map with attached text. 2.5 added the two new variables of readOnly and message. Read only if true will make it so users cannot remove the mark. Message is a message that is displayed when a mark is added. Set to for no message to be added. 231 | ---https://wiki.hoggitworld.com/view/DCS_func_markToAll 232 | ---@param id number 233 | ---@param text string 234 | ---@param vec3 table 235 | ---@param readOnly boolean 236 | ---@param message string 237 | function trigger.action.markToAll(id, text, vec3, readOnly, message) end 238 | 239 | ---Adds a mark point to a coalition on the F10 map with attached text. 2.5 added the two new variables of readOnly and message. Read only if true will make it so users cannot remove the mark. Message is a message that is displayed when a mark is added. Set to for no message to be added. 240 | ---https://wiki.hoggitworld.com/view/DCS_func_markToCoalition 241 | ---@param id number 242 | ---@param text string 243 | ---@param vec3 table 244 | ---@param coalitionId number 245 | ---@param readOnly boolean 246 | ---@param message string 247 | function trigger.action.markToCoalition(id, text, vec3, coalitionId, readOnly, message) end 248 | 249 | ---Adds a mark point to a group on the F10 map with attached text. 2.5 added the two new variables of readOnly and message. Read only if true will make it so users cannot remove the mark. Message is a message that is displayed when a mark is added. Set to for no message to be added. 250 | ---https://wiki.hoggitworld.com/view/DCS_func_markToGroup 251 | ---@param id number 252 | ---@param text string 253 | ---@param vec3 table 254 | ---@param groupId number 255 | ---@param readOnly boolean 256 | ---@param message string 257 | function trigger.action.markToGroup(id, text, vec3, groupId, readOnly, message) end 258 | 259 | ---Removes a mark panel from the f10 map 260 | ---https://wiki.hoggitworld.com/view/DCS_func_removeMark 261 | ---@param id number 262 | function trigger.action.removeMark(id) end 263 | 264 | 265 | ---Creates the defined shape on the F10 map. Uses the same definitions as the specific functions to create different shapes with the only difference being the first parameter is used to define the shape. This function does have an additional type of shape of "freeform" which allows you to create an 3+ vertices shape in any format you wish. Shape Ids: 266 | ---https://wiki.hoggitworld.com/view/DCS_func_markupToAll 267 | ---@return function 268 | ---@param shapeId number 269 | ---@param coalition number 270 | ---@param id number 271 | ---@param point1 table 272 | ---@param parameter any 273 | ---@param color table 274 | ---@param fillColor table 275 | ---@param lineType number 276 | ---@param readOnly boolean 277 | ---@param message string 278 | function trigger.action.markupToAll(shapeId, coalition, id, point1, parameter, color, fillColor, lineType, readOnly, message) end 279 | 280 | ---Creates a line on the F10 map from one point to another. Coalition Ids to be used. 281 | ---https://wiki.hoggitworld.com/view/DCS_func_lineToAll 282 | ---@return function 283 | ---@param coalition number 284 | ---@param id number 285 | ---@param startPoint table vec3 286 | ---@param endPoint table vec3 287 | ---@param color table 288 | ---@param lineType number 289 | ---@param readOnly boolean 290 | ---@param message string 291 | function trigger.action.lineToAll(coalition, id, startPoint, endPoint, color, lineType, readOnly, message) end 292 | 293 | ---Creates a circle on the map with a given radius, color, fill color, and outline. Coalition Ids to be used. 294 | ---https://wiki.hoggitworld.com/view/DCS_func_circleToAll 295 | ---@return function 296 | ---@param coalition number 297 | ---@param id number 298 | ---@param center table 299 | ---@param radius number 300 | ---@param color table 301 | ---@param fillColor table 302 | ---@param lineType number 303 | ---@param readOnly boolean 304 | ---@param message string 305 | function trigger.action.circleToAll(coalition, id, center, radius, color, fillColor, lineType, readOnly, message) end 306 | 307 | ---Creates a rectangle on the map from the startpoint in one corner to the endPoint in the opposite corner. Coalition Ids to be used. 308 | ---https://wiki.hoggitworld.com/view/DCS_func_rectToAll 309 | ---@return function 310 | ---@param coalition number 311 | ---@param id number 312 | ---@param startPoint table 313 | ---@param EndPoint table 314 | ---@param color table 315 | ---@param fillColor table 316 | ---@param lineType number 317 | ---@param readOnly boolean 318 | ---@param message string 319 | function trigger.action.rectToAll(coalition, id, startPoint, EndPoint, color, fillColor, lineType, readOnly, message) end 320 | 321 | ---Creates a shape defined by the 4 points on the F10 map. 322 | ---https://wiki.hoggitworld.com/view/DCS_func_quadToAll Coalition Ids to be used. 323 | ---@return function 324 | ---@param coalition number 325 | ---@param id number 326 | ---@param point1 table 327 | ---@param point2 table 328 | ---@param point3 table 329 | ---@param point4 table 330 | ---@param color table 331 | ---@param fillColor table 332 | ---@param lineType number 333 | ---@param readOnly boolean 334 | ---@param message string 335 | function trigger.action.quadToAll(coalition, id, point1, point2, point3, point4, color, fillColor, lineType, readOnly, message) end 336 | 337 | ---Creates a text imposed on the map at a given point. Text scales with the map. Coalition Ids to be used. 338 | ---https://wiki.hoggitworld.com/view/DCS_func_textToAll 339 | ---@return function 340 | ---@param coalition number 341 | ---@param id number 342 | ---@param point table 343 | ---@param color table 344 | ---@param fillColor table 345 | ---@param fontSize number 346 | ---@param readOnly boolean 347 | ---@param text string 348 | function trigger.action.textToAll(coalition, id, point, color, fillColor, fontSize, readOnly, text) end 349 | 350 | ---Creates an arrow from the startPoint to the endPoint on the F10 map. The arrow will be "pointing at" the startPoint. There is no control over other dimensions of the arrow. Coalition Ids to be used. 351 | ---https://wiki.hoggitworld.com/view/DCS_func_arrowToAll 352 | ---@return function 353 | ---@param coalition number 354 | ---@param id number 355 | ---@param startPoint table 356 | ---@param endPoint table 357 | ---@param color table 358 | ---@param fillColor table 359 | ---@param lineType number 360 | ---@param readOnly boolean 361 | ---@param message string 362 | function trigger.action.arrowToAll(coalition, id, startPoint, endPoint, color, fillColor, lineType, readOnly, message) end 363 | 364 | ---Updates the radius of the specified mark to be the new value. If the id of the passed mark is not a circle then nothing will happen. 365 | ---https://wiki.hoggitworld.com/view/DCS_func_setMarkupRadius 366 | ---@return function 367 | ---@param id number 368 | ---@param radius number 369 | function trigger.action.setMarkupRadius(id, radius) end 370 | 371 | ---Updates the text value of the passed mark to the passed text value. If the id of the passed mark does not have any text then nothing will happen. 372 | ---https://wiki.hoggitworld.com/view/DCS_func_setMarkupText 373 | ---@return function 374 | ---@param id number 375 | ---@param text string 376 | function trigger.action.setMarkupText(id, text) end 377 | 378 | 379 | ---Updates the font size of the specified mark to be the new value. If the id of the passed mark does not have text then nothing will happen. 380 | ---https://wiki.hoggitworld.com/view/DCS_func_setMarkupFontSize 381 | ---@return function 382 | ---@param id number 383 | ---@param fontSize number 384 | function trigger.action.setMarkupFontSize(id, fontSize) end 385 | 386 | 387 | ---Updates the color of the specified mark to be the new value. Color format is {r, g, b, alpha} with values ranging from 0 to 1. 388 | ---https://wiki.hoggitworld.com/view/DCS_func_setMarkupColor 389 | ---@return function 390 | ---@param id number 391 | ---@param color table 392 | function trigger.action.setMarkupColor(id, color) end 393 | 394 | 395 | ---Updates the colorfill of the specified mark to be the new value. Color format is {r, g, b, alpha} with values ranging from 0 to 1. 396 | ---https://wiki.hoggitworld.com/view/DCS_func_setMarkupColorFill 397 | ---@return function 398 | ---@param id number 399 | ---@param colorFill table 400 | function trigger.action.setMarkupColorFill(id, colorFill) end 401 | 402 | ---Updates the type line of the specified mark to be the new value. 403 | ---https://wiki.hoggitworld.com/view/DCS_func_setMarkupTypeLine 404 | ---@return function 405 | ---@param id number 406 | ---@param TypeLine number 407 | function trigger.action.setMarkupTypeLine(id, TypeLine) end 408 | 409 | ---Updates the position of a mark that was defined at the last point given to create it. Can be used to "move" an existing mark from one place to the next without deleting it and creating a new one. 410 | ---https://wiki.hoggitworld.com/view/DCS_func_setMarkupPositionEnd 411 | ---@return function 412 | ---@param id number 413 | ---@param vec3 table 414 | function trigger.action.setMarkupPositionEnd(id, vec3) end 415 | 416 | ---Updates the position of a mark that was defined at the first point given to create it. Can be used to "move" an existing mark from one place to the next without deleting it and creating a new one. 417 | ---https://wiki.hoggitworld.com/view/DCS_func_setMarkupPositionStart 418 | ---@return function 419 | ---@param id number 420 | ---@param vec3 table 421 | function trigger.action.setMarkupPositionStart(id, vec3) end 422 | 423 | 424 | ---Sets the task of the specified index to be the one and only active task. 425 | ---https://wiki.hoggitworld.com/view/DCS_func_setAITask 426 | ---@return function 427 | ---@param taskIndex number 428 | ---@param Group any 429 | function trigger.action.setAITask(Group, taskIndex) end 430 | 431 | ---Pushes the task of the specified index to the front of the tasking queue. 432 | ---https://wiki.hoggitworld.com/view/DCS_func_pushAITask 433 | ---@return function 434 | ---@param taskIndex number 435 | ---@param Group any 436 | function trigger.action.pushAITask(Group, taskIndex) end 437 | 438 | ---Activates the specified group if it is setup for "late activation." Calls the Group.activate function. 439 | ---https://wiki.hoggitworld.com/view/DCS_func_activateGroup 440 | ---@return function 441 | ---@param Group any Group 442 | function trigger.action.activateGroup(Group) end 443 | 444 | ---Deactivates the specified group. Calls the Group.destroy function. 445 | ---https://wiki.hoggitworld.com/view/DCS_func_deactivateGroup 446 | ---@return function 447 | ---@param Group any Group 448 | function trigger.action.deactivateGroup(Group) end 449 | 450 | ---Turns the specified groups AI on. Calls the Group.getController(setOnOff(true)) function. Only works with ground and ship groups. 451 | ---https://wiki.hoggitworld.com/view/DCS_func_setGroupAIOn 452 | ---@return function 453 | ---@param Group any Group 454 | function trigger.action.setGroupAIOn(Group) end 455 | 456 | 457 | ---Turns the specified groups AI off. Calls the Group.getController(setOnOff(false)) function. Only works with ground and ship groups. 458 | ---https://wiki.hoggitworld.com/view/DCS_func_setGroupAIOff 459 | ---@return function 460 | ---@param Group any Group 461 | function trigger.action.setGroupAIOff(Group) end 462 | 463 | ---Orders the specified group to stop moving. Calls Group.getController(setCommand()) function and sets the stopRoute command to true. Only works with ground groups. 464 | ---https://wiki.hoggitworld.com/view/DCS_func_groupStopMoving 465 | ---@return function 466 | ---@param Group any Group 467 | function trigger.action.groupStopMoving(Group) end 468 | 469 | ---Orders the specified group to resume moving. Calls Group.getController(setCommand()) function and sets the stopRoute command to false. Only works with ground groups. 470 | ---https://wiki.hoggitworld.com/view/DCS_func_groupContinueMoving 471 | ---@return function 472 | ---@param Group any Group 473 | function trigger.action.groupContinueMoving(Group) end 474 | 475 | return trigger -------------------------------------------------------------------------------- /classes.lua: -------------------------------------------------------------------------------- 1 | ---@meta 2 | 3 | -- https://wiki.hoggitworld.com/view/Simulator_Scripting_Engine_Documentation 4 | 5 | ---Represents an object with body, unique name, category and type. Non-final class 6 | ---https://wiki.hoggitworld.com/view/DCS_Class_Object 7 | Object = {} 8 | 9 | ---Represents all objects placed on the map. Bridges, buildings, etc. 10 | ---https://wiki.hoggitworld.com/view/DCS_Class_Scenery_Object 11 | SceneryObject = {} 12 | 13 | ---Represents all Objects those may belong to a coalition: units, airbases, static objects, weapon. Non-final class. 14 | ---https://wiki.hoggitworld.com/view/DCS_Class_Coalition_Object 15 | CoalitionObject = {} 16 | 17 | ---Represents units: airplanes, helicopters, vehicles, ships and armed ground structures. 18 | ---https://wiki.hoggitworld.com/view/DCS_Class_Unit 19 | Unit = {} 20 | 21 | ---Represents airbases: airdromes, helipads and ships with flying decks or landing pads. 22 | ---https://wiki.hoggitworld.com/view/DCS_Class_Airbase 23 | Airbase = {} 24 | 25 | ---Represents a weapon object: shell, rocket, missile and bomb 26 | ---https://wiki.hoggitworld.com/view/DCS_Class_Weapon 27 | Weapon = {} 28 | 29 | ---Represents static objects added in the Mission Editor or via scripting commands. 30 | ---https://wiki.hoggitworld.com/view/DCS_Class_Static_Object 31 | StaticObject = {} 32 | 33 | ---Represents a group of units. 34 | ---https://wiki.hoggitworld.com/view/DCS_Class_Group 35 | Group = {} 36 | 37 | ---Controller is an object that performs AI-routines. In other words a controller is an instance of the AI. Controller stores the current main task, active enroute tasks, and behavior options. Controllers also can perform commands. Controllers exist at both a group and unit level. However only planes and helicopters can be controlled individually at a unit level. Some functions can only work for Unit Controllers. Different tasks, options, and commands are available for the different group types. (Plane, Helicopter, Ground Unit, and Ship). See the linked articles on these subjects for more information. 38 | ---https://wiki.hoggitworld.com/view/DCS_Class_Controller 39 | Controller = {} 40 | 41 | ---Represents a spot from laser or IR-pointer. Final class. 42 | ---https://wiki.hoggitworld.com/view/DCS_Class_Spot 43 | Spot = {} 44 | 45 | ---Return a boolean value based on whether the object currently exists in the mission. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase 46 | ---https://wiki.hoggitworld.com/view/DCS_func_isExist 47 | ---@return boolean 48 | ---@param Self any Class 49 | function Object.isExist(Self) end 50 | 51 | ---Return a boolean value based on whether the object currently exists in the mission. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase 52 | ---https://wiki.hoggitworld.com/view/DCS_func_isExist 53 | ---@return boolean 54 | ---@param Self any Class 55 | function Unit.isExist(Self) end 56 | 57 | ---Return a boolean value based on whether the object currently exists in the mission. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase 58 | ---https://wiki.hoggitworld.com/view/DCS_func_isExist 59 | ---@return boolean 60 | ---@param Self any Class 61 | function Weapon.isExist(Self) end 62 | 63 | 64 | ---Return a boolean value based on whether the object currently exists in the mission. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase 65 | ---https://wiki.hoggitworld.com/view/DCS_func_isExist 66 | ---@return boolean 67 | ---@param Self any Class 68 | function StaticObject.isExist(Self) end 69 | 70 | ---Return a boolean value based on whether the object currently exists in the mission. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase 71 | ---https://wiki.hoggitworld.com/view/DCS_func_isExist 72 | ---@return boolean 73 | ---@param Self any Class 74 | function SceneryObject.isExist(Self) end 75 | 76 | ---Return a boolean value based on whether the object currently exists in the mission. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase 77 | ---https://wiki.hoggitworld.com/view/DCS_func_isExist 78 | ---@return boolean 79 | ---@param Self any Class 80 | function Airbase.isExist(Self) end 81 | 82 | ---Return a boolean value based on whether the object currently exists in the mission. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase 83 | ---https://wiki.hoggitworld.com/view/DCS_func_isExist 84 | ---@return boolean 85 | ---@param Self any Class 86 | function Group.isExist(Self) end 87 | 88 | ---Activates the group if the group has a delayed start or late activation. 89 | ---https://wiki.hoggitworld.com/view/DCS_func_activate 90 | ---@return function 91 | ---@param Self any Class 92 | function Group.activate(Self) end 93 | 94 | ---Destroys the object, physically removing it from the game world without creating an event. The object simply disappears. If used with a group, the entire group will be destroyed. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase 95 | ---https://wiki.hoggitworld.com/view/DCS_func_destroy TODO: Examples 96 | ---@return function 97 | ---@param Self any Class 98 | function Object.destroy(Self) end 99 | 100 | ---Destroys the object, physically removing it from the game world without creating an event. The object simply disappears. If used with a group, the entire group will be destroyed. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase 101 | ---https://wiki.hoggitworld.com/view/DCS_func_destroy 102 | ---@return function 103 | ---@param Self any Class 104 | function Group.destroy(Self) end 105 | 106 | ---Destroys the object, physically removing it from the game world without creating an event. The object simply disappears. If used with a group, the entire group will be destroyed. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase 107 | ---https://wiki.hoggitworld.com/view/DCS_func_destroy 108 | ---@return function 109 | ---@param Self any Class 110 | function Spot.destroy(Self) end 111 | 112 | ---Destroys the object, physically removing it from the game world without creating an event. The object simply disappears. If used with a group, the entire group will be destroyed. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase 113 | ---https://wiki.hoggitworld.com/view/DCS_func_destroy 114 | ---@return function 115 | ---@param Self any Class 116 | function Unit.destroy(Self) end 117 | 118 | ---Destroys the object, physically removing it from the game world without creating an event. The object simply disappears. If used with a group, the entire group will be destroyed. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase 119 | ---https://wiki.hoggitworld.com/view/DCS_func_destroy 120 | ---@return function 121 | ---@param Self any Class 122 | function Weapon.destroy(Self) end 123 | 124 | ---Destroys the object, physically removing it from the game world without creating an event. The object simply disappears. If used with a group, the entire group will be destroyed. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase 125 | ---https://wiki.hoggitworld.com/view/DCS_func_destroy 126 | ---@return function 127 | ---@param Self any Class 128 | function StaticObject.destroy(Self) end 129 | 130 | ---Destroys the object, physically removing it from the game world without creating an event. The object simply disappears. If used with a group, the entire group will be destroyed. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase 131 | ---https://wiki.hoggitworld.com/view/DCS_func_destroy 132 | ---@return function 133 | ---@param Self any Class 134 | function SceneryObject.destroy(Self) end 135 | 136 | ---Destroys the object, physically removing it from the game world without creating an event. The object simply disappears. If used with a group, the entire group will be destroyed. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase 137 | ---https://wiki.hoggitworld.com/view/DCS_func_destroy 138 | ---@return function 139 | ---@param Self any Class 140 | function Airbase.destroy(Self) end 141 | 142 | ---Return an enumerator of the category for the specific object. The enumerator returned is dependent on the category of the object. See enumerators Group.Category, Object.Category, and Spot.Category for further reference. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. When used with any of these objects the category returned is related to the Object.Category. 143 | ---https://wiki.hoggitworld.com/view/DCS_func_getCategory 144 | ---@return any enum 145 | ---@param Self any Class 146 | function Object.getCategory(Self) end 147 | 148 | ---Return an enumerator of the category for the specific object. The enumerator returned is dependent on the category of the object. See enumerators Group.Category, Object.Category, and Spot.Category for further reference. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. When used with any of these objects the category returned is related to the Object.Category. 149 | ---https://wiki.hoggitworld.com/view/DCS_func_getCategory 150 | ---@return any enum 151 | ---@param Self any Class 152 | function Group.getCategory(Self) end 153 | 154 | ---Return an enumerator of the category for the specific object. The enumerator returned is dependent on the category of the object. See enumerators Group.Category, Object.Category, and Spot.Category for further reference. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. When used with any of these objects the category returned is related to the Object.Category. 155 | ---https://wiki.hoggitworld.com/view/DCS_func_getCategory 156 | ---@return any enum 157 | ---@param Self any Class 158 | function Spot.getCategory(Self) end 159 | 160 | ---Return an enumerator of the category for the specific object. The enumerator returned is dependent on the category of the object. See enumerators Group.Category, Object.Category, and Spot.Category for further reference. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. When used with any of these objects the category returned is related to the Object.Category. 161 | ---https://wiki.hoggitworld.com/view/DCS_func_getCategory 162 | ---@return any enum 163 | ---@param Self any Class 164 | function Unit.getCategory(Self) end 165 | 166 | ---Return an enumerator of the category for the specific object. The enumerator returned is dependent on the category of the object. See enumerators Group.Category, Object.Category, and Spot.Category for further reference. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. When used with any of these objects the category returned is related to the Object.Category. 167 | ---https://wiki.hoggitworld.com/view/DCS_func_getCategory 168 | ---@return any enum 169 | ---@param Self any Class 170 | function Weapon.getCategory(Self) end 171 | 172 | ---Return an enumerator of the category for the specific object. The enumerator returned is dependent on the category of the object. See enumerators Group.Category, Object.Category, and Spot.Category for further reference. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. When used with any of these objects the category returned is related to the Object.Category. 173 | ---https://wiki.hoggitworld.com/view/DCS_func_getCategory 174 | ---@return any enum 175 | ---@param Self any Class 176 | function StaticObject.getCategory(Self) end 177 | 178 | ---Return an enumerator of the category for the specific object. The enumerator returned is dependent on the category of the object. See enumerators Group.Category, Object.Category, and Spot.Category for further reference. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. When used with any of these objects the category returned is related to the Object.Category. 179 | ---https://wiki.hoggitworld.com/view/DCS_func_getCategory 180 | ---@return any enum 181 | ---@param Self any Class 182 | function SceneryObject.getCategory(Self) end 183 | 184 | ---Return an enumerator of the category for the specific object. The enumerator returned is dependent on the category of the object. See enumerators Group.Category, Object.Category, and Spot.Category for further reference. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. When used with any of these objects the category returned is related to the Object.Category. 185 | ---https://wiki.hoggitworld.com/view/DCS_func_getCategory 186 | ---@return any enum 187 | ---@param Self any Class 188 | function Airbase.getCategory(Self) end 189 | 190 | 191 | ---Returns an enumerator that defines the coalition that an object currently belongs to. Function also works with Unit, Static Object, Airbase, Weapon 192 | ---https://wiki.hoggitworld.com/view/DCS_func_getCoalition 193 | ---@return any enum coalition.side TODO: examples and enum 194 | ---@param Self any Class 195 | function Object.getCoalition(Self) end 196 | 197 | ---Returns an enumerator that defines the coalition that an object currently belongs to. Function also works with Unit, Static Object, Airbase, Weapon 198 | ---https://wiki.hoggitworld.com/view/DCS_func_getCoalition 199 | ---@return any enum coalition.side 200 | ---@param Self any Class 201 | function Group.getCoalition(Self) end 202 | 203 | ---Returns an enumerator that defines the coalition that an object currently belongs to. Function also works with Unit, Static Object, Airbase, Weapon 204 | ---https://wiki.hoggitworld.com/view/DCS_func_getCoalition 205 | ---@return any enum coalition.side 206 | ---@param Self any Class 207 | function CoalitionObject.getCoalition(Self) end 208 | 209 | ---Returns an enumerator that defines the coalition that an object currently belongs to. Function also works with Unit, Static Object, Airbase, Weapon 210 | ---https://wiki.hoggitworld.com/view/DCS_func_getCoalition 211 | ---@return any enum coalition.side 212 | ---@param Self any Class 213 | function Unit.getCoalition(Self) end 214 | 215 | ---Returns an enumerator that defines the coalition that an object currently belongs to. Function also works with Unit, Static Object, Airbase, Weapon 216 | ---https://wiki.hoggitworld.com/view/DCS_func_getCoalition 217 | ---@return any enum coalition.side 218 | ---@param Self any Class 219 | function StaticObject.getCoalition(Self) end 220 | 221 | ---Returns an enumerator that defines the coalition that an object currently belongs to. Function also works with Unit, Static Object, Airbase, Weapon 222 | ---https://wiki.hoggitworld.com/view/DCS_func_getCoalition 223 | ---@return any enum coalition.side 224 | ---@param Self any Class 225 | function Airbase.getCoalition(Self) end 226 | 227 | ---Returns an enumerator that defines the coalition that an object currently belongs to. Function also works with Unit, Static Object, Airbase, Weapon 228 | ---https://wiki.hoggitworld.com/view/DCS_func_getCoalition 229 | ---@return any enum coalition.side 230 | ---@param Self any Class 231 | function Weapon.getCoalition(Self) end 232 | 233 | ---Returns a string of the name of the object as defined by the mission editor or dynamic spawning functions. Function also works with Unit, Static Object, Airbase When run as Object.getName(obj) the value can be different than if run via Unit.getName(obj) or obj:getName(). It appears to be returning the runtime Id. 234 | ---https://wiki.hoggitworld.com/view/DCS_func_getName 235 | ---@return string 236 | ---@param Self any Class 237 | function Object.getName(Self) end 238 | 239 | ---Returns a string of the name of the object as defined by the mission editor or dynamic spawning functions. Function also works with Unit, Static Object, Airbase When run as Object.getName(obj) the value can be different than if run via Unit.getName(obj) or obj:getName(). It appears to be returning the runtime Id. 240 | ---https://wiki.hoggitworld.com/view/DCS_func_getName 241 | ---@return string 242 | ---@param Self any Class 243 | function Group.getName(Self) end 244 | 245 | ---Returns a string of the name of the object as defined by the mission editor or dynamic spawning functions. Function also works with Unit, Static Object, Airbase When run as Object.getName(obj) the value can be different than if run via Unit.getName(obj) or obj:getName(). It appears to be returning the runtime Id. 246 | ---https://wiki.hoggitworld.com/view/DCS_func_getName 247 | ---@return string 248 | ---@param Self any Class 249 | function Unit.getName(Self) end 250 | 251 | ---Returns a string of the name of the object as defined by the mission editor or dynamic spawning functions. Function also works with Unit, Static Object, Airbase When run as Object.getName(obj) the value can be different than if run via Unit.getName(obj) or obj:getName(). It appears to be returning the runtime Id. 252 | ---https://wiki.hoggitworld.com/view/DCS_func_getName 253 | ---@return string 254 | ---@param Self any Class 255 | function StaticObject.getName(Self) end 256 | 257 | ---Returns a string of the name of the object as defined by the mission editor or dynamic spawning functions. Function also works with Unit, Static Object, Airbase When run as Object.getName(obj) the value can be different than if run via Unit.getName(obj) or obj:getName(). It appears to be returning the runtime Id. 258 | ---https://wiki.hoggitworld.com/view/DCS_func_getName 259 | ---@return string 260 | ---@param Self any Class 261 | function Airbase.getName(Self) end 262 | 263 | ---Returns a string of the name of the object as defined by the mission editor or dynamic spawning functions. Function also works with Unit, Static Object, Airbase When run as Object.getName(obj) the value can be different than if run via Unit.getName(obj) or obj:getName(). It appears to be returning the runtime Id. 264 | ---https://wiki.hoggitworld.com/view/DCS_func_getName 265 | ---@return string 266 | ---@param Self any Class 267 | function Weapon.getName(Self) end 268 | 269 | ---Returns a number which defines the unique mission id of a given object. 270 | ---https://wiki.hoggitworld.com/view/DCS_func_getID 271 | ---@return number 272 | ---@param Self any Class 273 | function Group.getID(Self) end 274 | 275 | ---Returns a number which defines the unique mission id of a given object. 276 | ---https://wiki.hoggitworld.com/view/DCS_func_getID 277 | ---@return number 278 | ---@param Self any Class 279 | function Unit.getID(Self) end 280 | 281 | ---Returns a number which defines the unique mission id of a given object. 282 | ---https://wiki.hoggitworld.com/view/DCS_func_getID 283 | ---@return number 284 | ---@param Self any Class 285 | function StaticObject.getID(Self) end 286 | 287 | ---Returns a number which defines the unique mission id of a given object. 288 | ---https://wiki.hoggitworld.com/view/DCS_func_getID 289 | ---@return number 290 | ---@param Self any Class 291 | function Airbase.getID(Self) end 292 | 293 | ---Returns the unit object of the specified unitIndex within the group. If the index is not valid, this function will return nil. 294 | ---https://wiki.hoggitworld.com/view/DCS_func_getUnit 295 | ---@ExampleDesc Returns the first unit in a group 296 | ---@Example local unit1 = Group.getByName('tanks'):getUnit(1) 297 | ---@return any Unit 298 | ---@param Self any Class 299 | ---@param UnitIndex number 300 | function Group.getUnit(Self, UnitIndex) end 301 | 302 | ---Returns the unit object of the specified unitIndex within the group. If the index is not valid, this function will return nil. 303 | ---https://wiki.hoggitworld.com/view/DCS_func_getUnit 304 | ---@ExampleDesc Returns the first unit in a group 305 | ---@Example local unit1 = Group.getByName('tanks'):getUnit(1) 306 | ---@return any Unit 307 | ---@param Self any Class 308 | ---@param UnitIndex number 309 | function Airbase.getUnit(Self, UnitIndex) end 310 | 311 | ---Returns a table of unit objects indexed in unit order. Useful for getting unit specific data for every unit in the group. 312 | ---https://wiki.hoggitworld.com/view/DCS_func_getUnits 313 | ---@ExampleDesc The following would run a function if any of the aircraft in the groups fuel level is below 10% 314 | ---@Example TODO: 315 | ---@return table 316 | ---@param Self any Class 317 | function Group.getUnits(Self) end 318 | 319 | ---Returns the current size of the group. This value will change as units are destroyed. Can be used in combination with getUnit to not accidentally use to big a value for that function, or to access the last unit in the group. 320 | ---https://wiki.hoggitworld.com/view/DCS_func_getSize 321 | ---@return number 322 | ---@param Self any Class 323 | function Group.getSize(Self) end 324 | 325 | 326 | ---Sets the passed group or unit objects radar emitters on or off. Can be used on sam sites for example to shut down the radar without setting AI off or changing the alarm state. 327 | ---https://wiki.hoggitworld.com/view/DCS_func_enableEmission 328 | ---@return any nothing 329 | ---@param Self any Class 330 | ---@param setting boolean 331 | function Group.enableEmission(Self, setting) end 332 | 333 | ---Sets the passed group or unit objects radar emitters on or off. Can be used on sam sites for example to shut down the radar without setting AI off or changing the alarm state. 334 | ---https://wiki.hoggitworld.com/view/DCS_func_enableEmission 335 | ---@return any nothing 336 | ---@param Self any Class 337 | ---@param setting boolean 338 | function Unit.enableEmission(Self, setting) end 339 | 340 | ---Returns the controller of the specified object. Ships and ground units can only be controlled at a group level. Airplanes and helicopters can be controlled at both a group and unit level. 341 | ---https://wiki.hoggitworld.com/view/DCS_func_getController 342 | ---@return any Controller 343 | ---@param Self any Class 344 | function Group.getController(Self) end 345 | 346 | ---Returns the controller of the specified object. Ships and ground units can only be controlled at a group level. Airplanes and helicopters can be controlled at both a group and unit level. 347 | ---https://wiki.hoggitworld.com/view/DCS_func_getController 348 | ---@return any Controller 349 | ---@param Self any Class 350 | function Unit.getController(Self) end 351 | 352 | ---Returns the initial size of the group as defined in the mission editor or if spawned via function. This number will not change as units are destroyed. 353 | ---https://wiki.hoggitworld.com/view/DCS_func_getInitialSize 354 | ---@return number 355 | ---@param Self any Class 356 | function Group.getInitialSize(Self) end 357 | 358 | ---Returns the current "life" of a unit. Also referred to as "hit points". All units in DCS have a value that defines how much life is left. If this value is less than 1 the unit is considered "dead". Ground and ship units that are on fire and in the process of "cooking off" will return a life value of 0 until the object explodes. Aircraft are more complex due to sub-systems and damage models which will effect the life value. 359 | ---https://wiki.hoggitworld.com/view/DCS_func_getLife 360 | ---@return number 361 | ---@param Self any Class 362 | function Unit.getLife(Self) end 363 | 364 | ---Returns the current "life" of a unit. Also referred to as "hit points". All units in DCS have a value that defines how much life is left. If this value is less than 1 the unit is considered "dead". Ground and ship units that are on fire and in the process of "cooking off" will return a life value of 0 until the object explodes. Aircraft are more complex due to sub-systems and damage models which will effect the life value. 365 | ---https://wiki.hoggitworld.com/view/DCS_func_getLife 366 | ---@return number 367 | ---@param Self any Class 368 | function StaticObject.getLife(Self) end 369 | 370 | ---Returns the current "life" of a unit. Also referred to as "hit points". All units in DCS have a value that defines how much life is left. If this value is less than 1 the unit is considered "dead". Ground and ship units that are on fire and in the process of "cooking off" will return a life value of 0 until the object explodes. Aircraft are more complex due to sub-systems and damage models which will effect the life value. 371 | ---https://wiki.hoggitworld.com/view/DCS_func_getLife 372 | ---@return number 373 | ---@param Self any Class 374 | function SceneryObject.getLife(Self) end 375 | 376 | 377 | ---Return a string of the objects type name. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase 378 | ---https://wiki.hoggitworld.com/view/DCS_func_getTypeName 379 | ---@return string 380 | ---@param Self any Class 381 | function Object.getTypeName(Self) end 382 | 383 | 384 | ---Return a string of the objects type name. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase 385 | ---https://wiki.hoggitworld.com/view/DCS_func_getTypeName 386 | ---@return string 387 | ---@param Self any Class 388 | function Unit.getTypeName(Self) end 389 | 390 | ---Return a string of the objects type name. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase 391 | ---https://wiki.hoggitworld.com/view/DCS_func_getTypeName 392 | ---@return string 393 | ---@param Self any Class 394 | function Weapon.getTypeName(Self) end 395 | 396 | 397 | ---Return a string of the objects type name. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase 398 | ---https://wiki.hoggitworld.com/view/DCS_func_getTypeName 399 | ---@return string 400 | ---@param Self any Class 401 | function StaticObject.getTypeName(Self) end 402 | 403 | ---Return a string of the objects type name. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase 404 | ---https://wiki.hoggitworld.com/view/DCS_func_getTypeName 405 | ---@return string 406 | ---@param Self any Class 407 | function SceneryObject.getTypeName(Self) end 408 | 409 | ---Return a string of the objects type name. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. 410 | ---https://wiki.hoggitworld.com/view/DCS_func_getTypeName 411 | ---@return string 412 | ---@param Self any Class 413 | function Airbase.getTypeName(Self) end 414 | 415 | ---Return a description table of the given object. Table entries are dependent on the category of object and the sub-categories that may exist within that object type. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. 416 | ---https://wiki.hoggitworld.com/view/DCS_func_getDesc 417 | ---@return table 418 | ---@param Self any Class 419 | function Object.getDesc(Self) end 420 | 421 | ---Return a description table of the given object. Table entries are dependent on the category of object and the sub-categories that may exist within that object type. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. 422 | ---https://wiki.hoggitworld.com/view/DCS_func_getDesc 423 | ---@return table 424 | ---@param Self any Class 425 | function Unit.getDesc(Self) end 426 | 427 | ---Return a description table of the given object. Table entries are dependent on the category of object and the sub-categories that may exist within that object type. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. 428 | ---https://wiki.hoggitworld.com/view/DCS_func_getDesc 429 | ---@return table 430 | ---@param Self any Class 431 | function Weapon.getDesc(Self) end 432 | 433 | ---Return a description table of the given object. Table entries are dependent on the category of object and the sub-categories that may exist within that object type. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. 434 | ---https://wiki.hoggitworld.com/view/DCS_func_getDesc 435 | ---@return table 436 | ---@param Self any Class 437 | function StaticObject.getDesc(Self) end 438 | 439 | ---Return a description table of the given object. Table entries are dependent on the category of object and the sub-categories that may exist within that object type. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. 440 | ---https://wiki.hoggitworld.com/view/DCS_func_getDesc 441 | ---@return table 442 | ---@param Self any Class 443 | function SceneryObject.getDesc(Self) end 444 | 445 | ---Return a description table of the given object. Table entries are dependent on the category of object and the sub-categories that may exist within that object type. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. 446 | ---https://wiki.hoggitworld.com/view/DCS_func_getDesc 447 | ---@return table 448 | ---@param Self any Class 449 | function Airbase.getDesc(Self) end 450 | 451 | ---Returns a boolean value if the object in question has the passed attribute. See Article list of Attributes or db_attibutes.lua in C:\Program Files\Eagle Dynamics\DCS World\Scripts\Database for more details. Additionally attributes for each object are defined within their DB lua file. DB files provided on github for reference. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. 452 | ---https://wiki.hoggitworld.com/view/DCS_func_hasAttribute 453 | ---@return boolean 454 | ---@param Self any Class 455 | ---@param attribute string 456 | function Object.hasAttribute(Self, attribute) end 457 | 458 | ---Returns a boolean value if the object in question has the passed attribute. See Article list of Attributes or db_attibutes.lua in C:\Program Files\Eagle Dynamics\DCS World\Scripts\Database for more details. Additionally attributes for each object are defined within their DB lua file. DB files provided on github for reference. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. 459 | ---https://wiki.hoggitworld.com/view/DCS_func_hasAttribute 460 | ---@return boolean 461 | ---@param Self any Class 462 | ---@param attribute string 463 | function Unit.hasAttribute(Self, attribute) end 464 | 465 | ---Returns a boolean value if the object in question has the passed attribute. See Article list of Attributes or db_attibutes.lua in C:\Program Files\Eagle Dynamics\DCS World\Scripts\Database for more details. Additionally attributes for each object are defined within their DB lua file. DB files provided on github for reference. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. 466 | ---https://wiki.hoggitworld.com/view/DCS_func_hasAttribute 467 | ---@return boolean 468 | ---@param Self any Class 469 | ---@param attribute string 470 | function Weapon.hasAttribute(Self, attribute) end 471 | 472 | ---Returns a boolean value if the object in question has the passed attribute. See Article list of Attributes or db_attibutes.lua in C:\Program Files\Eagle Dynamics\DCS World\Scripts\Database for more details. Additionally attributes for each object are defined within their DB lua file. DB files provided on github for reference. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. 473 | ---https://wiki.hoggitworld.com/view/DCS_func_hasAttribute 474 | ---@return boolean 475 | ---@param Self any Class 476 | ---@param attribute string 477 | function StaticObject.hasAttribute(Self, attribute) end 478 | 479 | ---Returns a boolean value if the object in question has the passed attribute. See Article list of Attributes or db_attibutes.lua in C:\Program Files\Eagle Dynamics\DCS World\Scripts\Database for more details. Additionally attributes for each object are defined within their DB lua file. DB files provided on github for reference. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. 480 | ---https://wiki.hoggitworld.com/view/DCS_func_hasAttribute 481 | ---@return boolean 482 | ---@param Self any Class 483 | ---@param attribute string 484 | function SceneryObject.hasAttribute(Self, attribute) end 485 | 486 | ---Returns a boolean value if the object in question has the passed attribute. See Article list of Attributes or db_attibutes.lua in C:\Program Files\Eagle Dynamics\DCS World\Scripts\Database for more details. Additionally attributes for each object are defined within their DB lua file. DB files provided on github for reference. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. 487 | ---https://wiki.hoggitworld.com/view/DCS_func_hasAttribute 488 | ---@return boolean 489 | ---@param Self any Class 490 | ---@param attribute string 491 | function Airbase.hasAttribute(Self, attribute) end 492 | 493 | ---Returns a vec3 table of the x, y, and z coordinates for the position of the given object in 3D space. Coordinates are dependent on the position of the maps origin. In the case of the Caucuses theater, the origin is located in the Crimean region of the map. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. 494 | ---https://wiki.hoggitworld.com/view/DCS_func_getPoint 495 | ---@return table vec3 496 | ---@param Self any Class 497 | function Object.getPoint(Self) end 498 | 499 | ---Returns a vec3 table of the x, y, and z coordinates for the position of the given object in 3D space. Coordinates are dependent on the position of the maps origin. In the case of the Caucuses theater, the origin is located in the Crimean region of the map. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. 500 | ---https://wiki.hoggitworld.com/view/DCS_func_getPoint 501 | ---@return table vec3 502 | ---@param Self any Class 503 | function Unit.getPoint(Self) end 504 | 505 | ---Returns a vec3 table of the x, y, and z coordinates for the position of the given object in 3D space. Coordinates are dependent on the position of the maps origin. In the case of the Caucuses theater, the origin is located in the Crimean region of the map. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. 506 | ---https://wiki.hoggitworld.com/view/DCS_func_getPoint 507 | ---@return table vec3 508 | ---@param Self any Class 509 | function Weapon.getPoint(Self) end 510 | 511 | ---Returns a vec3 table of the x, y, and z coordinates for the position of the given object in 3D space. Coordinates are dependent on the position of the maps origin. In the case of the Caucuses theater, the origin is located in the Crimean region of the map. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. 512 | ---https://wiki.hoggitworld.com/view/DCS_func_getPoint 513 | ---@return table vec3 514 | ---@param Self any Class 515 | function StaticObject.getPoint(Self) end 516 | 517 | ---Returns a vec3 table of the x, y, and z coordinates for the position of the given object in 3D space. Coordinates are dependent on the position of the maps origin. In the case of the Caucuses theater, the origin is located in the Crimean region of the map. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. 518 | ---https://wiki.hoggitworld.com/view/DCS_func_getPoint 519 | ---@return table vec3 520 | ---@param Self any Class 521 | function SceneryObject.getPoint(Self) end 522 | 523 | ---Returns a vec3 table of the x, y, and z coordinates for the position of the given object in 3D space. Coordinates are dependent on the position of the maps origin. In the case of the Caucuses theater, the origin is located in the Crimean region of the map. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. 524 | ---https://wiki.hoggitworld.com/view/DCS_func_getPoint 525 | ---@return table vec3 526 | ---@param Self any Class 527 | function Airbase.getPoint(Self) end 528 | 529 | ---Returns a pos3 table of the objects current position and orientation in 3D space. X, Y, Z values are unit vectors defining the objects orientation. Coordinates are dependent on the position of the maps origin. In the case of the Caucuses theater, the origin is located in the Crimean region of the map.Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. 530 | ---https://wiki.hoggitworld.com/view/DCS_func_getPosition 531 | ---@ExampleDesc Position 3 is a table consisting of the point and orientation tables. 532 | ---@Exampele Position3 = { p = Vec3, x = Vec3, y = Vec3, z = Vec3 } 533 | ---@return table vec3 534 | ---@param Self any Class 535 | function Object.getPosition(Self) end 536 | 537 | ---Returns a pos3 table of the objects current position and orientation in 3D space. X, Y, Z values are unit vectors defining the objects orientation. Coordinates are dependent on the position of the maps origin. In the case of the Caucuses theater, the origin is located in the Crimean region of the map.Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. 538 | ---https://wiki.hoggitworld.com/view/DCS_func_getPosition 539 | ---@ExampleDesc Position 3 is a table consisting of the point and orientation tables. 540 | ---@Exampele Position3 = { p = Vec3, x = Vec3, y = Vec3, z = Vec3 } 541 | ---@return table vec3 542 | ---@param Self any Class 543 | function Unit.getPosition(Self) end 544 | 545 | ---Returns a pos3 table of the objects current position and orientation in 3D space. X, Y, Z values are unit vectors defining the objects orientation. Coordinates are dependent on the position of the maps origin. In the case of the Caucuses theater, the origin is located in the Crimean region of the map.Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. 546 | ---https://wiki.hoggitworld.com/view/DCS_func_getPosition 547 | ---@ExampleDesc Position 3 is a table consisting of the point and orientation tables. 548 | ---@Exampele Position3 = { p = Vec3, x = Vec3, y = Vec3, z = Vec3 } 549 | ---@return table vec3 550 | ---@param Self any Class 551 | function Weapon.getPosition(Self) end 552 | 553 | ---Returns a pos3 table of the objects current position and orientation in 3D space. X, Y, Z values are unit vectors defining the objects orientation. Coordinates are dependent on the position of the maps origin. In the case of the Caucuses theater, the origin is located in the Crimean region of the map.Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. 554 | ---https://wiki.hoggitworld.com/view/DCS_func_getPosition 555 | ---@ExampleDesc Position 3 is a table consisting of the point and orientation tables. 556 | ---@Exampele Position3 = { p = Vec3, x = Vec3, y = Vec3, z = Vec3 } 557 | ---@return table vec3 558 | ---@param Self any Class 559 | function StaticObject.getPosition(Self) end 560 | 561 | ---Returns a pos3 table of the objects current position and orientation in 3D space. X, Y, Z values are unit vectors defining the objects orientation. Coordinates are dependent on the position of the maps origin. In the case of the Caucuses theater, the origin is located in the Crimean region of the map.Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. 562 | ---https://wiki.hoggitworld.com/view/DCS_func_getPosition 563 | ---@ExampleDesc Position 3 is a table consisting of the point and orientation tables. 564 | ---@Exampele Position3 = { p = Vec3, x = Vec3, y = Vec3, z = Vec3 } 565 | ---@return table vec3 566 | ---@param Self any Class 567 | function SceneryObject.getPosition(Self) end 568 | 569 | ---Returns a pos3 table of the objects current position and orientation in 3D space. X, Y, Z values are unit vectors defining the objects orientation. Coordinates are dependent on the position of the maps origin. In the case of the Caucuses theater, the origin is located in the Crimean region of the map.Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. 570 | ---https://wiki.hoggitworld.com/view/DCS_func_getPosition 571 | ---@ExampleDesc Position 3 is a table consisting of the point and orientation tables. 572 | ---@Exampele Position3 = { p = Vec3, x = Vec3, y = Vec3, z = Vec3 } 573 | ---@return table vec3 574 | ---@param Self any Class 575 | function Airbase.getPosition(Self) end 576 | 577 | ---Returns a vec3 table of the objects velocity vectors. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase 578 | ---https://wiki.hoggitworld.com/view/DCS_func_getVelocity 579 | ---@return table vec3 580 | ---@param Self any Class 581 | function Object.getVelocity(Self) end 582 | 583 | ---Returns a vec3 table of the objects velocity vectors. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase 584 | ---https://wiki.hoggitworld.com/view/DCS_func_getVelocity 585 | ---@return table vec3 586 | ---@param Self any Class 587 | function Unit.getVelocity(Self) end 588 | 589 | ---Returns a vec3 table of the objects velocity vectors. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase 590 | ---https://wiki.hoggitworld.com/view/DCS_func_getVelocity 591 | ---@return table vec3 592 | ---@param Self any Class 593 | function Weapon.getVelocity(Self) end 594 | 595 | ---Returns a vec3 table of the objects velocity vectors. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase 596 | ---https://wiki.hoggitworld.com/view/DCS_func_getVelocity 597 | ---@return table vec3 598 | ---@param Self any Class 599 | function StaticObject.getVelocity(Self) end 600 | 601 | ---Returns a vec3 table of the objects velocity vectors. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase 602 | ---https://wiki.hoggitworld.com/view/DCS_func_getVelocity 603 | ---@return table vec3 604 | ---@param Self any Class 605 | function SceneryObject.getVelocity(Self) end 606 | 607 | ---Returns a vec3 table of the objects velocity vectors. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase 608 | ---https://wiki.hoggitworld.com/view/DCS_func_getVelocity 609 | ---@return table vec3 610 | ---@param Self any Class 611 | function Airbase.getVelocity(Self) end 612 | 613 | ---Returns a vec3 table of the objects velocity vectors. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase 614 | ---https://wiki.hoggitworld.com/view/DCS_func_inAir 615 | ---@return boolean 616 | ---@param Self any Class 617 | function Object.inAir(Self) end 618 | 619 | ---Returns a vec3 table of the objects velocity vectors. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase 620 | ---https://wiki.hoggitworld.com/view/DCS_func_inAir 621 | ---@return boolean 622 | ---@param Self any Class 623 | function Unit.inAir(Self) end 624 | 625 | ---Returns a vec3 table of the objects velocity vectors. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase 626 | ---https://wiki.hoggitworld.com/view/DCS_func_inAir 627 | ---@return boolean 628 | ---@param Self any Class 629 | function Weapon.inAir(Self) end 630 | 631 | ---Returns a vec3 table of the objects velocity vectors. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase 632 | ---https://wiki.hoggitworld.com/view/DCS_func_inAir 633 | ---@return boolean 634 | ---@param Self any Class 635 | function StaticObject.inAir(Self) end 636 | 637 | ---Returns a vec3 table of the objects velocity vectors. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase 638 | ---https://wiki.hoggitworld.com/view/DCS_func_inAir 639 | ---@return boolean 640 | ---@param Self any Class 641 | function SceneryObject.inAir(Self) end 642 | 643 | ---Returns a vec3 table of the objects velocity vectors. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase 644 | ---https://wiki.hoggitworld.com/view/DCS_func_inAir 645 | ---@return boolean 646 | ---@param Self any Class 647 | function Airbase.inAir(Self) end 648 | 649 | ---Returns an enumerator that defines the country that an object currently belongs to. Function also works with Unit, Static Object, Airbase, Weapon 650 | ---https://wiki.hoggitworld.com/view/DCS_func_getCountry 651 | ---@return any enum country.id 652 | ---@param Self any Class 653 | function Object.getCountry(Self) end 654 | 655 | ---Returns an enumerator that defines the country that an object currently belongs to. Function also works with Unit, Static Object, Airbase, Weapon 656 | ---https://wiki.hoggitworld.com/view/DCS_func_getCountry 657 | ---@return any enum country.id 658 | ---@param Self any Class 659 | function Unit.getCountry(Self) end 660 | 661 | ---Returns an enumerator that defines the country that an object currently belongs to. Function also works with Unit, Static Object, Airbase, Weapon 662 | ---https://wiki.hoggitworld.com/view/DCS_func_getCountry 663 | ---@return any enum country.id 664 | ---@param Self any Class 665 | function StaticObject.getCountry(Self) end 666 | 667 | ---Returns an enumerator that defines the country that an object currently belongs to. Function also works with Unit, Static Object, Airbase, Weapon 668 | ---https://wiki.hoggitworld.com/view/DCS_func_getCountry 669 | ---@return any enum country.id 670 | ---@param Self any Class 671 | function Airbase.getCountry(Self) end 672 | 673 | ---Returns an enumerator that defines the country that an object currently belongs to. Function also works with Unit, Static Object, Airbase, Weapon 674 | ---https://wiki.hoggitworld.com/view/DCS_func_getCountry 675 | ---@return any enum country.id 676 | ---@param Self any Class 677 | function Weapon.getCountry(Self) end 678 | 679 | ---Returns a boolean value if the unit is activated. Units set to late activation would return false if checked by this function. 680 | ---https://wiki.hoggitworld.com/view/DCS_func_isActive 681 | ---@return boolean 682 | ---@param Self any Class 683 | function Unit.isActive(Self) end 684 | 685 | ---Returns a string value of the name of the player if the unit is currently controlled by a player. If a unit is controlled by AI the function returns nil. 686 | ---https://wiki.hoggitworld.com/view/DCS_func_getPlayerName 687 | ---@return string 688 | ---@param Self any Class 689 | function Unit.getPlayerName(Self) end 690 | 691 | ---Returns a numerical value of the default index of the specified unit within the group as defined within the mission editor or addGroup scripting function. This value is not changed as units within the group are destroyed. 692 | ---https://wiki.hoggitworld.com/view/DCS_func_getNumber 693 | ---@return number 694 | ---@param Self any Class 695 | function Unit.getPlayerName(Self) end 696 | 697 | ---Returns a numerical value of the default index of the specified unit within the group as defined within the mission editor or addGroup scripting function. This value is not changed as units within the group are destroyed. 698 | ---https://wiki.hoggitworld.com/view/DCS_func_getNumber 699 | ---@return any Group 700 | ---@param Self any Class 701 | function Unit.getGroup(Self) end 702 | 703 | ---Returns a localized string of the units callsign. In the case of airbases the callsign of world airbases is defined by the game. Callsigns for units, farps, or ships can be specified by the user with the mission editor or scripting engine. 704 | ---https://wiki.hoggitworld.com/view/DCS_func_getCallsign 705 | ---@return string 706 | ---@param Self any Class 707 | function Unit.getCallsign(Self) end 708 | 709 | ---Returns a localized string of the units callsign. In the case of airbases the callsign of world airbases is defined by the game. Callsigns for units, farps, or ships can be specified by the user with the mission editor or scripting engine. 710 | ---https://wiki.hoggitworld.com/view/DCS_func_getCallsign 711 | ---@return string 712 | ---@param Self any Class 713 | function Airbase.getCallsign(Self) end 714 | 715 | ---Returns the initial life value of a unit. All units spawn with "max HP" and this value will never change. Can be used with Unit.getLife() to determine the percentage of a units life as each unit has a unique life value. 716 | ---https://wiki.hoggitworld.com/view/DCS_func_getLife0 717 | ---@return number 718 | ---@param Self any Class 719 | function Unit.getLife0(Self) end 720 | 721 | ---Returns a percentage of the current fuel remaining in an aircraft's inventory based on the maximum possible fuel load. Value ranges from 0.00 to 1.00. If external fuel tanks are present the value may display above 1.0. Fuel is always drained from the external tanks before moving to internal tanks. Ground vehicles and ships will always return a value of 1. 722 | ---https://wiki.hoggitworld.com/view/DCS_func_getLife0 723 | ---@return number 724 | ---@param Self any Class 725 | function Unit.getFuel(Self) end 726 | 727 | ---Returns an ammo table for all types of loaded ammunition on a given object. Ammo table is indexed by ammo type and contains a weapon description table and a count variable defining "how much" is on board. 728 | ---https://wiki.hoggitworld.com/view/DCS_func_getAmmo 729 | ---@return table 730 | ---@param Self any Class 731 | function Unit.getAmmo(Self) end 732 | 733 | ---Returns a table defining each of the sensors available to the specified unit. 734 | ---https://wiki.hoggitworld.com/view/DCS_func_getSensors 735 | ---@return table 736 | ---@param Self any Class 737 | function Unit.getSensors(Self) end 738 | 739 | ---Returns true if the unit has the specified sensors. If SensorType is not specified the function will return true if the unit has any type of sensors. Some sensorTypes have additional subcategories which can be used to further specify for certain sensors. 740 | ---https://wiki.hoggitworld.com/view/DCS_func_hasSensors 741 | ---@Example TODO: 742 | ---@return boolean 743 | ---@param Self any Class 744 | ---@param SensorType any enum 745 | ---@param SubCategory any enum 746 | function Unit.hasSensors(Self, SensorType, SubCategory) end 747 | 748 | ---Returns two values. The first value is a boolean indicating if any radar on the Unit is operational. The second value is the Object the radar is most interested in and/or actively tracking. 749 | ---https://wiki.hoggitworld.com/view/DCS_func_getRadar 750 | ---@Example TODO: 751 | ---@return boolean, any object 752 | ---@param Self any Class 753 | function Unit.getRadar(Self) end 754 | 755 | ---Returns the current value for an animation argument on the external model of the given object. Each model animation has an id tied to with different values representing different states of the model. Animation arguments can be figured out by opening the respective 3d model in the modelviewer. For example you can determine the rotation and orientation of the barrel of a Tanks cannon by checking its animation arguments. More practically you can determine whether or not a helicopters doors are open. If draw argument value is invalid for the unit in question a value of 0 will be returned. 756 | ---https://wiki.hoggitworld.com/view/DCS_func_getDrawArgumentValue 757 | ---@Example Return -1 to +1 TODO: 758 | ---@return number 759 | ---@param Self any Class 760 | function Unit.getDrawArgumentValue(Self) end 761 | 762 | ---Returns the current value for an animation argument on the external model of the given object. Each model animation has an id tied to with different values representing different states of the model. Animation arguments can be figured out by opening the respective 3d model in the modelviewer. For example you can determine the rotation and orientation of the barrel of a Tanks cannon by checking its animation arguments. More practically you can determine whether or not a helicopters doors are open. If draw argument value is invalid for the unit in question a value of 0 will be returned. 763 | ---https://wiki.hoggitworld.com/view/DCS_func_getDrawArgumentValue 764 | ---@Example Return -1 to +1 TODO: 765 | ---@return number 766 | ---@param Self any Class 767 | function StaticObject.getDrawArgumentValue(Self) end 768 | 769 | ---Returns a table of friendly cargo objects indexed numerically and sorted by distance from the helicopter. Returns nil if used on any object other than a helicopter. 770 | ---https://wiki.hoggitworld.com/view/DCS_func_getNearestCargos 771 | ---@Example TODO: 772 | ---@return table 773 | ---@param Self any Class 774 | function Unit.getNearestCargos(Self) end 775 | 776 | ---Sets the passed group or unit objects radar emitters on or off. Can be used on sam sites for example to shut down the radar without setting AI off or changing the alarm state. 777 | ---https://wiki.hoggitworld.com/view/DCS_func_enableEmission 778 | ---@return nil nothing 779 | ---@param Self any Class 780 | ---@param setting boolean 781 | function Unit.enableEmission(Self, setting) end 782 | 783 | ---Sets the passed group or unit objects radar emitters on or off. Can be used on sam sites for example to shut down the radar without setting AI off or changing the alarm state. 784 | ---https://wiki.hoggitworld.com/view/DCS_func_enableEmission 785 | ---@return nil nothing 786 | ---@param Self any Class 787 | ---@param setting boolean 788 | function Group.enableEmission(Self, setting) end 789 | 790 | ---Returns the number of infantry that can be embark onto the aircraft. Only returns a value if run on airplanes or helicopters. Returns nil if run on ground or ship units. 791 | ---https://wiki.hoggitworld.com/view/DCS_func_getDescentCapacity 792 | ---@return number number 793 | ---@param Self any Class 794 | function Unit.getDescentCapacity(Self) end 795 | 796 | ---Returns a table of parking data for a given airbase. If the optional value is passed only available parking will be returned, otherwise all parking at the base is returned. Term types have the following enumerated values: TODO: 797 | ---https://wiki.hoggitworld.com/view/DCS_func_getParking 798 | ---@return table 799 | ---@param Self any Class 800 | ---@param available boolean 801 | function Airbase.getParking(Self, available) end 802 | 803 | ---Returns a table with runway information like length, width, course, and Name. position: Returns the center of the runway width: width of the runway in meters Name: runway name, can be off course: bearing in radians. Multiply by -1 to make it useful 804 | ---https://wiki.hoggitworld.com/view/DCS_func_getRunways 805 | ---@Example { [1] = { ["course"] = -1.597741484642, ["Name"] = 8, ["position"] = { ["y"] = 952.94458007813, ["x"] = -360507.1875, ["z"] = -75590.0703125, }, ["length"] = 1859.3155517578, ["width"] = 60, }, [2] = { ["course"] = -2.5331676006317, ["Name"] = 26, ["position"] = { ["y"] = 952.94458007813, ["x"] = -359739.875, ["z"] = -75289.5078125, }, ["length"] = 1859.3155517578, ["width"] = 60, }, } 806 | ---@Example TODO: Other example 807 | ---@return table 808 | ---@param Self any Class 809 | function Airbase.getParking(Self) end 810 | 811 | ---Returns a table of vec3 objects corresponding to the passed value. Seems to only ever return a single object "Tower" object. Have been unable to get it to work with other types. 812 | ---https://wiki.hoggitworld.com/view/DCS_func_getTechObjectPos 813 | ---@Example Return: { ["pos"] = { ["y"] = 30.01003074646, ["x"] = 11039.798828125, ["z"] = 367775.40625, }, } 814 | ---@return table 815 | ---@param Self any Class 816 | ---@param ObjectType number number or string 817 | function Airbase.getTechObjectPos(Self, ObjectType) end 818 | 819 | ---Returns a boolean value for whether or not the ATC for the passed airbase object has been silenced. 820 | ---https://wiki.hoggitworld.com/view/DCS_func_getRadioSilentMode 821 | ---@return boolean 822 | ---@param Self any Class 823 | function Airbase.getRadioSilentMode(Self) end 824 | 825 | --- Sets the ATC belonging to an airbase object to be silent and unresponsive. This is useful for disabling the award winning ATC behavior in DCS. Note that this DOES NOT remove the airbase from the list. It just makes it unresponsive and silent to any radio calls to it. true : enabled silent mode. false : disables silent mode. 826 | ---https://wiki.hoggitworld.com/view/DCS_func_setRadioSilentMode 827 | ---@example TODO: 828 | ---@return nil none 829 | ---@param Self any Class 830 | function Airbase.getRadioSilentMode(Self) end 831 | 832 | ---Returns the Unit object that had launched the weapon. 833 | ---https://wiki.hoggitworld.com/view/DCS_func_getLauncher 834 | ---@return any Unit 835 | ---@param Self any Class 836 | function Weapon.getLauncher(Self) end 837 | 838 | ---Returns the target object that the weapon is guiding to. 839 | ---https://wiki.hoggitworld.com/view/DCS_func_getTarget 840 | ---@return any Unit 841 | ---@param Self any Class 842 | function Weapon.getTarget(Self) end 843 | 844 | ---Returns a string of a cargo objects mass in the format 'mass kg'. Can't be used to check IF an object is a cargo object. As of 1.2.16.38741 the simulator will crash if this function is passed a non cargo static object. 845 | ---https://wiki.hoggitworld.com/view/DCS_func_getCargoDisplayName 846 | ---@example 1500 kg 847 | ---@return string 848 | ---@param Self any Class 849 | function StaticObject.getCargoDisplayName(Self) end 850 | 851 | ---Returns the mass of a cargo object measured in kg. 852 | ---https://wiki.hoggitworld.com/view/DCS_func_getCargoWeight 853 | ---@example 700 854 | ---@return number 855 | ---@param Self any Class 856 | function StaticObject.getCargoWeight(Self) end 857 | 858 | ---Returns an instance of the calling class for the object of a specified name. The objects name is defined either in the mission editor or within functions that can dynamically spawn objects. All static objects and unit names must be unique. However groups may have the same name as a unit or static object. This function can provide access to non activated units and groups. 859 | ---https://wiki.hoggitworld.com/view/DCS_func_getByName 860 | ---@return any class 861 | ---@param name string 862 | function Group.getByName(name) end 863 | 864 | ---Returns an instance of the calling class for the object of a specified name. The objects name is defined either in the mission editor or within functions that can dynamically spawn objects. All static objects and unit names must be unique. However groups may have the same name as a unit or static object. This function can provide access to non activated units and groups. 865 | ---https://wiki.hoggitworld.com/view/DCS_func_getByName 866 | ---@return any class 867 | ---@param name string 868 | function Unit.getByName(name) end 869 | 870 | ---Returns an instance of the calling class for the object of a specified name. The objects name is defined either in the mission editor or within functions that can dynamically spawn objects. All static objects and unit names must be unique. However groups may have the same name as a unit or static object. This function can provide access to non activated units and groups. 871 | ---https://wiki.hoggitworld.com/view/DCS_func_getByName 872 | ---@return any class 873 | ---@param name string 874 | function StaticObject.getByName(name) end 875 | 876 | ---Return a description table of the specified Object type. Object does not need to be in the mission in order to query its data. Function works with Unit, Static Object, Scenery Object, Airbase. 877 | ---https://wiki.hoggitworld.com/view/DCS_func_getDescByName 878 | ---@return table 879 | ---@param typeName string 880 | function Unit.getByName(typeName) end 881 | 882 | ---Return a description table of the specified Object type. Object does not need to be in the mission in order to query its data. Function works with Unit, Static Object, Scenery Object, Airbase. 883 | ---https://wiki.hoggitworld.com/view/DCS_func_getDescByName 884 | ---@return table 885 | ---@param typeName string 886 | function StaticObject.getByName(typeName) end 887 | 888 | ---Return a description table of the specified Object type. Object does not need to be in the mission in order to query its data. Function works with Unit, Static Object, Scenery Object, Airbase. 889 | ---https://wiki.hoggitworld.com/view/DCS_func_getDescByName 890 | ---@return table 891 | ---@param typeName string 892 | function Weapon.getByName(typeName) end 893 | 894 | ---Return a description table of the specified Object type. Object does not need to be in the mission in order to query its data. Function works with Unit, Static Object, Scenery Object, Airbase. 895 | ---https://wiki.hoggitworld.com/view/DCS_func_getDescByName 896 | ---@return table 897 | ---@param typeName string 898 | function Airbase.getByName(typeName) end 899 | 900 | ---Sets the specified task to the units or groups associated with the controller object. Tasks must fit a specified format. For more information see the specific task page you are looking for: Main Tasks: mission, AttackGroup, AttackUnit, Bombing, CarpetBombing, AttackMapObject, BombingRunway, orbit, refueling, land, follow, followBigFormation, escort, Embarking, fireAtPoint, hold, FAC_AttackGroup, EmbarkToTransport, DisembarkFromTransport, CargoTransportation, goToWaypoint, groundEscort. Enroute Tasks: engageTargets, engageTargetsInZone, engageGroup, engageUnit, awacs, tanker, ewr, FAC_engageGroup, FAC. 901 | ---https://wiki.hoggitworld.com/view/DCS_func_setTask 902 | ---@return function 903 | ---@param self any Class 904 | ---@param task table 905 | function Controller.setTask(self, task) end 906 | 907 | ---Resets the current task assigned to the controller. 908 | ---https://wiki.hoggitworld.com/view/DCS_func_resetTask 909 | ---@return function 910 | ---@param self any Class 911 | function Controller.resetTask(self) end 912 | 913 | ---Pushes the specified task to the front of the tasking queue. If no other tasks are currently active it will function effectively the same as Controller.setTask()For more information see the specific task page you are looking for: Main Tasks: mission, AttackGroup, AttackUnit, Bombing, CarpetBombing, AttackMapObject, BombingRunway, orbit, refueling, land, follow, followBigFormation, escort, Embarking, fireAtPoint, hold, FAC_AttackGroup, EmbarkToTransport, DisembarkFromTransport, CargoTransportation, goToWaypoint, groundEscort. Enroute Tasks: engageTargets, engageTargetsInZone, engageGroup, engageUnit, awacs, tanker, ewr, FAC_engageGroup, FAC. 914 | ---https://wiki.hoggitworld.com/view/DCS_func_pushTask 915 | ---@return function 916 | ---@param self any Class 917 | ---@param task table task 918 | function Controller.pushTask(self, task) end 919 | 920 | ---Removes the top task from the tasking queue. 921 | ---https://wiki.hoggitworld.com/view/DCS_func_popTask 922 | ---@return function 923 | ---@param self any Class 924 | function Controller.popTask(self) end 925 | 926 | ---Returns true if the controller currently has a task. 927 | ---https://wiki.hoggitworld.com/view/DCS_func_hasTask 928 | ---@return boolean 929 | ---@param self any Class 930 | function Controller.hasTask(self) end 931 | 932 | ---Commands are instant actions that require zero time to perform. Commands may be used both for control unit/group behavior and control game mechanics. Setting a command will have no impact on active tasking. Reference the following pages for details on each command: script, setCallsign, setFrequency, switchWaypoint, stopRoute, switchAction, setInvisible, setImmortal, activateBeacon, deactivateBeacon, eplrs, start, transmitMessage, stopTransmission, smoke_on_off 933 | ---https://wiki.hoggitworld.com/view/DCS_func_setCommand 934 | ---@return function 935 | ---@param self any Class 936 | ---@param command table 937 | function Controller.setCommand(self, command) end 938 | 939 | ---Options are a pair of identifier and value. Behavior options are global parameters and will affect controller behavior in all tasks it performs. Options are executed immediately. For example Rules of Engagement (ROE) are an option that can dictate whether or not a group is currently allowed to attack. This option can over-ride tasking to attack specific targets. Unlike Tasks and Commands, options are organized by id and value. Reference the following pages for details on each option: ROE, Reaction To Threat, Radar Using, Flare Using, Formation, RTB On Bingo, silence, Disperse on Attack, Alarm State, RTB on Out of Ammo, ECM Using, Prohibit AA, Prohibit Jettison, Prohibit Afterburner, Prohibit AG, Missile Attack Range, Prohibit WP Pass Report, Engage Air Weapons, Option Radio Usage Contact, Option Radio Usage Engage, Option Radio Usage Kill, AC Engagement Range Restriction, jett tanks if empty, forced attack, Altitude Restriction for AAA Min, restrict targets, Altitude Restriction for AAA Max. 940 | ---https://wiki.hoggitworld.com/view/DCS_func_setOption 941 | ---@return function 942 | ---@param self any Class 943 | ---@param optionId any number or enum 944 | ---@param optionValue any number or enum 945 | function Controller.setOption(self, optionId, optionValue) end 946 | 947 | ---Enables or disables the AI controller for the specified group or unit. When AI is turned off the units are incapable of moving, shooting, or detecting targets. Function CAN NOT be used on aircraft or helicopters. This function will only work on ground or naval forces! When the value passed is false the AI is set off. When the value passed is true the AI is set on. 948 | ---https://wiki.hoggitworld.com/view/DCS_func_setOnOff 949 | ---@example TODO: 950 | ---@return function 951 | ---@param self any Class 952 | ---@param value boolean 953 | function Controller.setOnOff(self, value) end 954 | 955 | ---Forces the controller to become aware of the specified target, without the controller manually detecting the object itself. Applies only to a Unit Controller. Cannot be used at the group level. 956 | ---https://wiki.hoggitworld.com/view/DCS_func_setOnOff 957 | ---@example TODO: 958 | ---@return function 959 | ---@param self any Class 960 | ---@param object any object 961 | ---@param type boolean 962 | ---@param distance boolean 963 | function Controller.knowTarget(self, object, type, distance) end 964 | 965 | ---Returns multiple entries that define a number of values if the target is detected by the Unit or group associated with the controller. Values returned are: |boolean detected, -- boolean value if the target is detected| boolean visible, -- boolean value if target is visible by line of sight| ModelTime lastTime, -- the last model time that the target was detected| boolean type, -- if the type of target is known| boolean distance, -- if distance to the target is known| Vec3 lastPos, -- last known position of the target| Vec3 lastVel -- last know velocity vector of the tar|. Function is available at the unit level for all unit types. When used with a Group Controller the function will return expected values only with Ground and Ship groups. 966 | ---https://wiki.hoggitworld.com/view/DCS_func_isTargetDetected 967 | ---@return any multiple 968 | ---@param self any Class 969 | ---@param target any object 970 | ---@param detectionType1 any enum 971 | ---@param detectionType2 any enum 972 | ---@param detectionTypeEtc any enum 973 | function Controller.isTargetDetected(self, target, detectionType1, detectionType2, detectionTypeEtc) end 974 | 975 | 976 | ---Returns a table of detected targets that are detected by the different detection methods. If not detection method is specified, then all forms of detection will be used. Applies only to a Unit Controller. Cannot be used at the group level. 977 | ---https://wiki.hoggitworld.com/view/DCS_func_getDetectedTargets 978 | ---@return table 979 | ---@param self any Class 980 | ---@param detectionType1 any enum 981 | ---@param detectionType2 any enum 982 | ---@param detectionTypeEtc any enum 983 | function Controller.getDetectedTargets(self, detectionType1, detectionType2, detectionTypeEtc) end 984 | 985 | ---Creates a laser ray emanating from the given object to a point in 3d space. localRef is technically an optional variable, however the functions format requires an entry to be made. If not used, simply replace with nil If optional variable laserCode is not present the beam will automatically be set to a IR beam. If laserCode is specified the beam is a laser which can be used to guide laser guided bombs.Laser code is any 4 digit number between 1111 and 1788. 986 | ---https://wiki.hoggitworld.com/view/DCS_func_createLaser 987 | ---@example TODO: 988 | ---@return table 989 | ---@param source any Object 990 | ---@param localRef table vec3 991 | ---@param point table vec3 992 | ---@param laseCode number 993 | function Spot.createLaser(source, localRef, point, laseCode) end 994 | 995 | ---Creates an infrared ray emanating from the given object to a point in 3d space. Can be seen with night vision goggles. localRef is technically an optional variable, however the functions format requires an entry to be made. If not used, simply replace with nil. 996 | ---https://wiki.hoggitworld.com/view/DCS_func_createInfraRed 997 | ---@example TODO: 998 | ---@return any Spot Spot Object 999 | ---@param source any Object 1000 | ---@param localRef table vec3 1001 | ---@param point table vec3 1002 | function Spot.createLaser(source, localRef, point) end 1003 | 1004 | ---Returns a vec3 table of the x, y, and z coordinates for the position of the given object in 3D space. Coordinates are dependent on the position of the maps origin. In the case of the Caucuses theater, the origin is located in the Crimean region of the map. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. 1005 | ---https://wiki.hoggitworld.com/view/DCS_func_getPoint 1006 | ---@example TODO: 1007 | ---@return table vec3 1008 | ---@param self any Class 1009 | ---@param localRef table vec3 1010 | ---@param point table vec3 1011 | function Spot.getPoint(self, localRef, point) end 1012 | 1013 | --- Sets the destination point from which the source of the spot is drawn toward. 1014 | ---https://wiki.hoggitworld.com/view/DCS_func_setPoint 1015 | ---@example TODO: 1016 | ---@return function 1017 | ---@param self any Class 1018 | ---@param vec3 table 1019 | function Spot.setPoint(self, vec3) end 1020 | 1021 | ---Sets the number that is used to define the laser code for which laser designation can track. Default and max value is 1688 1022 | ---https://wiki.hoggitworld.com/view/DCS_func_setCode 1023 | ---@return function 1024 | ---@param self any Class 1025 | ---@param code number 1026 | function Spot.setCode(self, code) end 1027 | 1028 | 1029 | ---Returns the number that is used to define the laser code for which laser designation can track. Default and max value is 1688 1030 | ---https://wiki.hoggitworld.com/view/DCS_func_getCode 1031 | ---@return function 1032 | ---@param self any Class 1033 | function Spot.getCode(self) end --------------------------------------------------------------------------------