Low Blow Posted April 15, 2014 Posted April 15, 2014 Hi, I have used Mist 3_3 to DO SCRIPT in a mission trigger with the following code: local vars = { type = "Cargo1", country = 'USA', category = "Cargo", x = -338460, y = 705500, name = "Cargo_Load1", heading = 0.47123889803847, } mist.dynAddStatic(vars) However, when I went to sling load the cargo it wouldn't allow me to access the "all cargos" option in the comms menu, presumably because the game doesn't recognise this as "can be cargo". Can anyone please tell me what line I should insert into this script so the game recognises this as cargo that can be sling loaded... Thanks in advance.:) [sIGPIC][/sIGPIC]Twitch: My Specs: i7 8700K, 32gig Corsair DDR4 3000Mhz, 2080ti, Obutto R3volution, VKB Gunfighter Mk.III MCG Pro EN, Warthog Throttle, Saitek Combat Pedals, Oculus Rift S MMSOBGYTAST!
Blindspot Posted July 8, 2014 Posted July 8, 2014 (edited) Hi Low_Blow, this is because MIST 3.3 does not honor the needed properties "mass" and "canCargo" (see for yourself within the code there). You need to use the "standard" scripting function "coalition.addStaticObject" (see sample below). Your category name is wrong, it has to be "Cargos" not "Cargo". And you must provide a unique name to it. Mass is in kilograms btw., not pounds as it is in the editor. local zoneTest = trigger.misc.getZone("Dropzone"); coalition.addStaticObject(country.id.USA, { country = "USA", category = "Cargos", x = zoneTest.point.x, y = zoneTest.point.z, type = "Cargo1", name = "Ladung123", mass = 113, canCargo = true }); If done so, the cargo appears and can be selected via menu F6. Edited July 9, 2014 by Blindspot Я только понимаю Вокзал.
RastaPutin Posted December 30, 2014 Posted December 30, 2014 (edited) Cant get Mist to work ...possibly needs whoever is maintaining it to update it to handle Cargo/Cargo1 objects? However after much tinkering using the normal Scripting Engine this appears to work. It spawns a static cargo unit in the center of a zone, that is identified on the menu and is lift-able. Works on v-1.2.14.35605 ( I fly the Mi8 ) zoneCoords = trigger.misc.getZone("ZoneA") -- Gets zone data ... coordinates StaticData = { ["country"] = "USA", ["category"] = "Cargo", ["shape_name"] = "ab-212_cargo", -- ***IMPORTANT*** - without it .. app crashes!! ["type"] = "Cargo1", -- ["unitId"] = 1000, -- must be unique, other wise will overwrite an existing unit!! ["y"] = zoneCoords.point.z, -- Note z for y ["x"] = zoneCoords.point.x, ["name"] = "BorisIsATwat", -- my one eyed goldfish is a better programmer! ["canCargo"] = true, -- Make liftable by choppers ["mass"] = 5000, -- In kilogramms ["heading"] = 0, -- heading 0 <> 360 } coalition.addStaticObject(2, StaticData) -- '2' is country .. assigns coalition. Edited December 31, 2014 by RastaPutin
GunfighterSIX Posted February 17, 2015 Posted February 17, 2015 Anyway to make this work in a moving zone? HHC, 229th AHB, 1st Cav Div http://1stcavdiv.conceptbb.com/
Recommended Posts