Jump to content

Recommended Posts

Posted (edited)

I'm pretty good at making and removing unit groups dynamically. 

 

Now I want a dynamic FARP that is created from F10 radio menu. I can't do it. The FARP itself does indeed spawn but deep underground under the relief. I also create fuel and ammo structures at the same spot ON the ground surface. It does not work and I can't refuel. 

 

Does anyone have any experience with creating dynamic FARPs? 

Edited by Sobakopes
  • Like 1
Posted

AFAIK, dynamic FARPS may have issues with multiplayer, but should work with Single Player. 

 

It would help if you showed us how you spawned the FARP- that shows if you also remembered to get the elevation of the map at the place where you spawn the FARP 🙂 (if you don't that would explain the deep underground bit)

 

Why don't you post the code or a simple test mission where you spawn a FARP, and we can have a look.

 

 

  • Like 1
Posted (edited)
1 час назад, cfrag сказал:

AFAIK, dynamic FARPS may have issues with multiplayer, but should work with Single Player. 

 

It would help if you showed us how you spawned the FARP- that shows if you also remembered to get the elevation of the map at the place where you spawn the FARP 🙂 (if you don't that would explain the deep underground bit)

 

Why don't you post the code or a simple test mission where you spawn a FARP, and we can have a look.

 

 

local data =

{

["visible"] = true,

["tasks"] = {},

["hidden"] = false,

["units"] =

{

[1] =

{

["y"] = ranpos.z,

["type"] = "FARP",

["name"] = "FARP",

["heading"] = 0,

["x"] = ranpos.x,

},

},

["name"] = "Po",

}

coalition.addGroup(country.id.RUSSIA, -1, data)

 

AT THIS POINT I HAVE DESIGNED A FARP VIA GROUP CREATION AND PLACED IT ON THE MAP

I also want a fuel structure

 

 

data =

{

["visible"] = true,

["tasks"] = {},

["hidden"] = false,

["units"] =

{

[1] =

{

["y"] = ranpos.z + 20,

["type"] = "FARP Fuel Depot",

["name"] = "Fuel",

["heading"] = 0,

["x"] = ranpos.x + 20,

},

},

["name"] = "Be",

}

 

coalition.addGroup(country.id.RUSSIA, -1, data)

Edited by Sobakopes
  • Like 1
Posted (edited)
11 минут назад, cfrag сказал:

This may be a stupid question, but why are you adding a static object like a FARP with addGroup(), and not addStaticObject() ?

 

I never tried adding a static as group, but can you try addStaticObject() instead?

The encyclopedia said that you can create FARPs using addGroup but you need to place a -1 as a parameter... Let me find the link in a sec https://wiki.hoggitworld.com/view/DCS_func_addGroup

 

I will try object! 

Edited by Sobakopes
  • Like 1
Posted
10 hours ago, Sobakopes said:

...Does anyone have any experience with creating dynamic FARPs? 

 

 

I don't ... But I kept some times ago an example from another user for spawning complete FARP dynamically using mist, it is supposed to work (not tried) :

Spoiler

local vars = 
{
 type = 'FARP', 
 country = 'USA', 
 category = 'Heliports', 
 x = -279221.99287927, 
 y = 22610.496047639,
 name = 'FOB', 
 heading = 4.7822021504645,
 clone = true,
 dead =false,
 }
 
 mist.dynAddStatic(vars)
 
 local vars2 = 
{
 type = 'FARP Ammo Dump Coating', 
 country = 'USA', 
 category = 'Fortifications', 
 x = -279096.38525582, 
 y = 22460.881098381,
 name = 'AD2', 
 heading = 4.7822021504645,
 clone = true,
 dead =false,
 }
 
 mist.dynAddStatic(vars2)
 
 local vars3 = 
{
 type = 'FARP Fuel Depot', 
 country = 'USA', 
 category = 'Fortifications', 
 x = -279086.42310297, 
 y = 22471.042494287,
 name = 'FD2', 
 heading = 4.7822021504645,
 clone = true,
 dead =false,
 }
 
 mist.dynAddStatic(vars3)
 
  local vars4 = 
{
 type = 'FARP CP Blindage', 
 country = 'USA', 
 category = 'Fortifications', 
 x = -278894.86029389, 
 y = 22665.08068319,
 name = 'CP2', 
 heading = 4.7822021504645,
 clone = true,
 dead =false,
 }
 
 mist.dynAddStatic(vars4)

 

  • Like 1
Posted

Now it works but I can't make repairs on the FARP. 

 

 

 

 

local data =

 

{

 

  ["visible"] = true,

  ["tasks"] = {},

  ["hidden"] = false,

  ["units"] =

  {

 

    [1] =

    {

    ["y"] = ranpos.z,

    ["category"] = "Heliports",

    ["shape_name"] = "FARP",

    ["type"] = "SINGLE_HELIPAD",

    ["name"] = "FARP",

    ["heading"] = 0,

    ["x"] = ranpos.x,

    },

 

  },

["name"] = "Po",

}

  • Recently Browsing   0 members

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