Task Fire At Point - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 06-12-2019, 07:51 PM   #1
funkyfranky
Senior Member
 
funkyfranky's Avatar
 
Join Date: Sep 2015
Location: Asgård
Posts: 2,155
Default Task Fire At Point

What is the table structure for this task?

Hoggit tells me
Code:
FireAtPoint = { 
  id = 'FireAtPoint', 
  params = { 
    point = Vec2,
    radius = Distance, 
    expendQty = number,
    expendQtyEnabled = boolean, 
    weaponType = number, 
  }
 }
But in the DCS mission table it is
Code:
["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.
__________________
Of all the things I've lost, I miss my mind the most. --- Mark Twain
i7-8700K | Asus RTX 2080Ti Strix OC| 32 GB Ram 3200 MHz DDR-4 | Asus Maximus Hero X | Samung EVO 960 Pro SSD | VKB Gunfighter Pro | MFG Crosswind | Rift S
RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss

Last edited by funkyfranky; 06-12-2019 at 08:04 PM.
funkyfranky is offline   Reply With Quote
Old 06-13-2019, 05:39 AM   #2
Zayets
Member
 
Join Date: Oct 2005
Location: Australia
Posts: 302
Default

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:

Code:
 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.
__________________
OK

Last edited by Zayets; 06-13-2019 at 05:46 AM. Reason: Formatting
Zayets is offline   Reply With Quote
Old 06-13-2019, 07:31 AM   #3
Grimes
ED Testers Team
 
Grimes's Avatar
 
Join Date: Jan 2006
Location: Black Mesa
Posts: 7,891
Default

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/DC...r_ground_units
__________________
You can only tie the world record for lowest flight.
Current Projects: Scripting Wiki, Something...
Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread), SLMOD for DCS 1.5/2.0, IADScript, Mission Editing Wiki!, Mission Building Forum
Grimes is offline   Reply With Quote
Old 06-13-2019, 07:37 AM   #4
funkyfranky
Senior Member
 
funkyfranky's Avatar
 
Join Date: Sep 2015
Location: Asgård
Posts: 2,155
Default

Quote:
Originally Posted by Grimes View Post
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/DC...r_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.
__________________
Of all the things I've lost, I miss my mind the most. --- Mark Twain
i7-8700K | Asus RTX 2080Ti Strix OC| 32 GB Ram 3200 MHz DDR-4 | Asus Maximus Hero X | Samung EVO 960 Pro SSD | VKB Gunfighter Pro | MFG Crosswind | Rift S
RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss
funkyfranky is offline   Reply With Quote
Old 06-13-2019, 09:12 PM   #5
Hardcard
Member
 
Hardcard's Avatar
 
Join Date: May 2013
Posts: 459
Default

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...
Hardcard is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 02:12 PM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.