Jump to content

Task Fire At Point


funkyfranky

Recommended Posts

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 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

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 by Zayets
Formatting

[sIGPIC]OK[/sIGPIC]

Link to comment
Share on other sites

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 ServerScripting 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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...