TEMPEST.114 Posted December 7, 2022 Posted December 7, 2022 So there's the great function DCS func setUnitInternalCargo - DCS World Wiki - Hoggitworld.com But that overrides the existing amount. If you are picking up 3 passengers at different times/locations, you need to add them incrementally. So ideally you need to know the helo's current cargo mass to add on each pax as they get picked up. But there is no 'getUnitInternalCargo' for some really, really crazy reason... The only thing I've found is the 'getDesc()' that has a: ["massEmpty"] = 34000, So, is this the only way? DCS func getDesc - DCS World Wiki - Hoggitworld.com And use the empty weight and then add on each 'passenger'? Which unfortunately means you have to remember how many pax it loaded and how much their individual masses are...
Grimes Posted December 7, 2022 Posted December 7, 2022 Internal cargo is added mass. If you used setUnitInternalCargo with the empty mass value then the total mass of the aircraft would be emptymass * 2 + weapon + fuel. So don't do that unless you want to make them super heavy. The values within getDesc are static and do not change. To answer your question you gotta keep track of it on your own. The value outright sets the mass, assuming each passenger weighs the same you do something like currentPassangers = currentPassangers + 1 trigger.action.setUnitInternalCargo("heli" , currentPassangers * passangerMass ) 1 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
TEMPEST.114 Posted December 8, 2022 Author Posted December 8, 2022 2 hours ago, Grimes said: Internal cargo is added mass. If you used setUnitInternalCargo with the empty mass value then the total mass of the aircraft would be emptymass * 2 + weapon + fuel. So don't do that unless you want to make them super heavy. The values within getDesc are static and do not change. To answer your question you gotta keep track of it on your own. The value outright sets the mass, assuming each passenger weighs the same you do something like currentPassangers = currentPassangers + 1 trigger.action.setUnitInternalCargo("heli" , currentPassangers * passangerMass ) Yeah, that is what I figured and changed my data structures to manage that. thanks though.
Recommended Posts