Theodossis Posted December 21, 2019 Posted December 21, 2019 As the title says. Isn't Unit:getCategory() supposed to return Unit.Category.* types? https://wiki.hoggitworld.com/view/DCS_Class_Unit
Grimes Posted December 21, 2019 Posted December 21, 2019 I know. It was reported back in June. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
dorianR666 Posted April 5, 2021 Posted April 5, 2021 hi, is this still broken? Unit.getCategory(object) seems to give me Object.Category instead of Unit.Category CPU: AMD Ryzen 5 1600X GPU: AMD RX 580
Grimes Posted April 6, 2021 Posted April 6, 2021 Yes, still broken. 1 The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
SNAFU Posted September 14, 2021 Posted September 14, 2021 Still broken? [sIGPIC][/sIGPIC] Unsere Facebook-Seite
Grimes Posted September 16, 2021 Posted September 16, 2021 Yep, still broken. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
Branli Posted November 6, 2021 Posted November 6, 2021 Is this even going to be fixed? It really limits the verifying and conditional options in Mission Scripting / Mission Building... 1
toutenglisse Posted November 16, 2021 Posted November 16, 2021 (edited) On 11/6/2021 at 10:27 PM, Branli said: Is this even going to be fixed? It really limits the verifying and conditional options in Mission Scripting / Mission Building... As pointed by @Grimes in this thread : You can use Unit:getDesc()["category"] and that will return the expected value you need (0 for plane unit, 1 for helicopter, 2 for ground unit etc...). Edited November 16, 2021 by toutenglisse 1
Branli Posted November 16, 2021 Posted November 16, 2021 9 hours ago, toutenglisse said: As pointed by @Grimes in this thread : You can use Unit:getDesc()["category"] and that will return the expected value you need (0 for plane unit, 1 for helicopter, 2 for ground unit etc...). Thanks for the Tip! For the time being i created an elaborate workaround to check what kind of unit it is, naming the group something like "AI-TANK-01" "AI-PLANE-01" and extract the category data from the group name, but this makes it much easier.
Grimes Posted November 16, 2021 Posted November 16, 2021 29 minutes ago, Branli said: Thanks for the Tip! For the time being i created an elaborate workaround to check what kind of unit it is, naming the group something like "AI-TANK-01" "AI-PLANE-01" and extract the category data from the group name, but this makes it much easier. Group.getCategory should work just fine since it is not a subclass of the Object hierarchy. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
Recommended Posts