DCS func searchObjects: Difference between revisions
From DCS World Wiki - Hoggitworld.com
m 1 revision imported |
No edit summary |
||
| (4 intermediate revisions by 2 users not shown) | |||
| Line 15: | Line 15: | ||
|desc= Searches a defined volume of 3d space for the specified objects within it and then can run function on each returned object. | |desc= 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 | 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. | Search volume is the defined 3d space that will be searched. See pages for the correct format of each volume type: | ||
{{listOfVolumes}} | |||
Handler is the function that will be run on each object that is found. | Handler is the function that will be run on each object that is found. | ||
| Line 25: | Line 27: | ||
|rtnType= table | |rtnType= table | ||
|rtnExample= | |rtnExample= [[DCS_Class_Object|Object]] | ||
|reqType1= table/enum | |reqType1= table/enum | ||
| Line 63: | Line 65: | ||
local ifFound = function(foundItem, val) | local ifFound = function(foundItem, val) | ||
foundUnits[#foundUnits + 1] = foundItem:getName | foundUnits[#foundUnits + 1] = foundItem:getName() | ||
return true | return true | ||
end | end | ||
| Line 78: | Line 80: | ||
[[Category:Singleton Functions|searchObjects]] | [[Category:Singleton Functions|searchObjects]] | ||
[[Category:Game Patch 1.2.4|searchObjects]] | |||
