Sobakopes Posted September 27, 2021 Posted September 27, 2021 (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 September 27, 2021 by Sobakopes 1
cfrag Posted September 27, 2021 Posted September 27, 2021 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. 1
Sobakopes Posted September 27, 2021 Author Posted September 27, 2021 (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 September 27, 2021 by Sobakopes 1
cfrag Posted September 27, 2021 Posted September 27, 2021 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?
Sobakopes Posted September 27, 2021 Author Posted September 27, 2021 (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 September 27, 2021 by Sobakopes 1
cfrag Posted September 27, 2021 Posted September 27, 2021 Actually, it seems you are correct, as the notes in addStaticObject say. My bad. -ch
toutenglisse Posted September 27, 2021 Posted September 27, 2021 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) 1
Sobakopes Posted September 28, 2021 Author Posted September 28, 2021 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", }
cfrag Posted September 28, 2021 Posted September 28, 2021 (edited) This may answer your question. You need some vehicles on your FARP (probably communication) -ch Edited September 28, 2021 by cfrag
Recommended Posts