fargo007 Posted January 23, 2021 Share Posted January 23, 2021 Looking for a method to obtain the cargo status and mass of a static cargo object. Thanks for any direction. Have fun. Don't suck. Kill bad guys. https://discord.gg/blacksharkden/ Link to comment Share on other sites More sharing options...
Vantskruv Posted January 27, 2021 Share Posted January 27, 2021 (edited) 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 January 27, 2021 by Vantskruv Link to comment Share on other sites More sharing options...
fargo007 Posted January 28, 2021 Author Share Posted January 28, 2021 Thank you, this is enough of a lead for me to figure it out! Have fun. Don't suck. Kill bad guys. https://discord.gg/blacksharkden/ Link to comment Share on other sites More sharing options...
Recommended Posts