Jump to content

How can I get the mass of a static cargo object?


fargo007

Recommended Posts

Hoggit has a good reference to DCS lua scripting, sometimes with examples, and sometimes you need to test and trial how to implement the functions.

https://wiki.hoggitworld.com/view/DCS_func_getByName

https://wiki.hoggitworld.com/view/DCS_func_getCargoWeight

 

-- not 100% sure if this is the correct code to retrieve a static object.
cargoObject = StaticObject.getByName("cargo666")
-- currently not sure the correct way to get the data, I think it is either of these two.
weight = cargoObject.getCargoWeight()
weight = StaticObject.getCargoWeight(cargoObject)

 

EDIT:

Also, you can get a table of data with all the information concerning the object (I guess), in either of these two ways:

https://wiki.hoggitworld.com/view/DCS_func_getDescByName

https://wiki.hoggitworld.com/view/DCS_func_getDesc

Though, the structure of the table may be different depending on what type of object it is, currently I am not sure where to find the reference of this, but you can print the table of the object in the mission, and do some detective work from there....


Edited by Vantskruv
Link to comment
Share on other sites

  • Recently Browsing   0 members

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