Jagohu Posted October 9, 2020 Posted October 9, 2020 Hi all, I've been playing around with this and I managed to spawn Sea Shelf Objects, but destroying them doesn't seem to work properly: it just removes their label from the map, and that's pretty much all I can see that happens. These "Static objects" seem to be handled as units(Helipad) not as static objects , so they're "destroyed" by Unit.getByName('Static Oil rig-3'):destroy() [22] = { ["heading"] = 0, ["route"] = { ["points"] = { [1] = { ["alt"] = 0, ["type"] = "", ["name"] = "", ["y"] = -392469.37973366, ["speed"] = 0, ["x"] = -85383.310628902, ["formation_template"] = "", ["action"] = "", }, -- end of [1] }, -- end of ["points"] }, -- end of ["route"] ["groupId"] = 4661, ["units"] = { [1] = { ["category"] = "Heliports", ["shape_name"] = "oil_platform", ["type"] = "Oil rig", ["unitId"] = 5506, ["rate"] = 100, ["y"] = -392469.37973366, ["x"] = -85383.310628902, ["name"] = "DictKey_GroupName_14051", ["heading"] = 0, }, -- end of [1] }, -- end of ["units"] ["y"] = -392469.37973366, ["x"] = -85383.310628902, ["name"] = "DictKey_GroupName_14051", ["dead"] = false, Static Objects/Structures/Oil Platform is a different story. Does anyone know how to actually remove them from the scenery? They keep sitting there and they still exist on the map too, although without a label: https://drive.google.com/file/d/1q3XJZlSo9s3Qp8UUcd0RzJSOHBQ9JiJL/view?usp=sharing Thanks!
Jagohu Posted October 10, 2020 Author Posted October 10, 2020 https://drive.google.com/file/d/1GEEOzj9WCUHl1K9FLiibD9pj9FdFVcS6/view?usp=sharing Another weird one, when hitting an oil rig with a couple of MK84s. Error message, then it says the rig is destroyed, but yet it stays there and doesn't disappear from the map either.
Jagohu Posted October 10, 2020 Author Posted October 10, 2020 Found this in the \DCSWorld\CoreMods\tech\TechWeaponPack\Database\db_ground_objects.lua add_structure({ Name = "Oil rig", DisplayName = _("Oil rig"), ShapeName = "oil_platform", Life = 2500, Rate = 100, category = 'Heliport', subCategory = 'SeaShelfObject', -- only for ME SeaObject = true, isPutToWater = true, positioning = "NO", classname = "lOilPlatform", numParking = 1, }) add_structure({ Name = "Gas platform", DisplayName = _("Gas platform"), ShapeName = "gas_platform", Life = 2500, Rate = 100, category = 'Heliport', subCategory = 'SeaShelfObject', -- only for ME SeaObject = true, isPutToWater = true, positioning = "NO", classname = "lGasPlatform", numParking = 1, })
Grimes Posted October 11, 2020 Posted October 11, 2020 I believe it is classed similar to a FARP object and therefore doesn't despawn like normal objects can. 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
Jagohu Posted October 12, 2020 Author Posted October 12, 2020 Too bad, I hope it'll change. It seems like these Oil and Gas platforms eat up a lot of memory/cpu power when they're used in numbers close to reality in the PG area, at least my experience starts becoming choppy here and there even if they're out of sight.
Recommended Posts