funkyfranky Posted June 12, 2019 Share Posted June 12, 2019 (edited) What is the table structure for this task? Hoggit tells me FireAtPoint = { id = 'FireAtPoint', params = { point = Vec2, radius = Distance, expendQty = number, expendQtyEnabled = boolean, weaponType = number, } } But in the DCS mission table it is ["task"] = { ["id"] = "ComboTask", ["params"] = { ["tasks"] = { [1] = { ["number"] = 1, ["auto"] = false, ["id"] = "FireAtPoint", ["enabled"] = true, ["params"] = { ["y"] = 616931.58246177, ["expendQty"] = 100, ["expendQtyEnabled"] = true, ["x"] = -287901.9304195, ["templateId"] = "", ["weaponType"] = 805339120, ["zoneRadius"] = 1000.0488, }, -- end of ["params"] }, -- end of [1] }, -- end of ["tasks"] }, -- end of ["params"] }, -- end of ["task"] So the parameters "params" are quite different. Edited June 12, 2019 by funkyfranky A warrior's mission is to foster the success of others. i9-12900K | MSI RTX 3080Ti Suprim X | 128 GB Ram 3200 MHz DDR-4 | MSI MPG Edge Z690 | Samung EVO 980 Pro SSD | Virpil Stick, Throttle and Collective | MFG Crosswind | HP Reverb G2 RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss Link to comment Share on other sites More sharing options...
Zayets Posted June 13, 2019 Share Posted June 13, 2019 (edited) I have seen many times this but it usually works. Vec2 gets expanded into x,y while templateID is optional. More interesting is the example given: local target = {} target.x = trigger.misc.getZone('killzone').point.x target.y = trigger.misc.getZone('killzone').point.z target.radius = trigger.misc.getZone('killzone').radius target.expendQty = 20 target.expendQtyEnabled = true local fire = {id = 'FireAtPoint', params = target} Group.getByName('arty'):getController():pushTask(fire) There's no Vec2 directly defined but separate x,y coordinates which makes me think that point Vec2 is split into point.x, point.y in the implementation. EDIT: come to think of it, just to be on the safe side I would use x,y coordinates as in the mission file. Not sure why it looks better to me. Also, worth a shot to check with a Vec2 and see if any difference. Edited June 13, 2019 by Zayets Formatting [sIGPIC]OK[/sIGPIC] Link to comment Share on other sites More sharing options...
Grimes Posted June 13, 2019 Share Posted June 13, 2019 For the coords I think both work. I've been using point = {x, y} just fine. Much of the task docs were based off of the original documentation written by an ED dev: https://wiki.hoggitworld.com/view/DCS_Scripting_orig_Part_2#Tasks_for_ground_units 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 Link to comment Share on other sites More sharing options...
funkyfranky Posted June 13, 2019 Author Share Posted June 13, 2019 For the coords I think both work. I've been using point = {x, y} just fine. Much of the task docs were based off of the original documentation written by an ED dev: https://wiki.hoggitworld.com/view/DCS_Scripting_orig_Part_2#Tasks_for_ground_units Yeah, same here. Both versions seem to work fine. However, there is also a difference when you specify the radius, i.e. "radius" vs. "zoneRadius". I was wondering if that changed at some point or if also both are valid. I shall test and see if there is a difference. A warrior's mission is to foster the success of others. i9-12900K | MSI RTX 3080Ti Suprim X | 128 GB Ram 3200 MHz DDR-4 | MSI MPG Edge Z690 | Samung EVO 980 Pro SSD | Virpil Stick, Throttle and Collective | MFG Crosswind | HP Reverb G2 RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss Link to comment Share on other sites More sharing options...
Hardcard Posted June 13, 2019 Share Posted June 13, 2019 Is there a way to make it work with vec3 points? I've been looking for ways of making ground units attack random vec3 points, no luck so far, they keep shooting at ground level, even shilkas and vulcans... [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Recommended Posts