LoOni3r 6 Posted April 19, 2020 Hello everybody, how can I read the mass (weight) of a vehicle without spawning it? getNumber(configFile >> "CfgVehicles" >> _cfgname >> "mass"); doesn't seem to exist. getmass and mass unfortunately requires an object many thanks in advance Share this post Link to post Share on other sites
Dedmen 2716 Posted April 24, 2020 Afaik the mass is stored in the model, so you need to get the model.. by spawning it. Maybe you can just createSimpleObject it under the ground, far away from view? Share this post Link to post Share on other sites
BRPVP 69 Posted April 24, 2020 Sometimes this is necessary. You can spawn the vehicle in [0,0,0]. get the mass and delete it. Share this post Link to post Share on other sites
gc8 979 Posted April 24, 2020 25 minutes ago, BRPVP said: You can spawn the vehicle in [0,0,0]. get the mass and delete it. yes use createVehicleLocal on server, then delete Share this post Link to post Share on other sites
Dedmen 2716 Posted April 24, 2020 34 minutes ago, gc8 said: yes use createVehicleLocal on server, then delete Thanks for unintentionally reminding me.. Completely forgot that I wanted to add createSimpleObjectLocal 🤦♂️ Share this post Link to post Share on other sites
gc8 979 Posted April 24, 2020 5 minutes ago, Dedmen said: Thanks for unintentionally reminding me.. Completely forgot that I wanted to add createSimpleObjectLocal 🤦♂️ I don't see command with that name in wiki but createSimpleObject allows third parameter to define the locality. Does simple objects have all the geometry like "normal" objects do? Share this post Link to post Share on other sites
Dedmen 2716 Posted April 24, 2020 15 minutes ago, gc8 said: Does simple objects have all the geometry like "normal" objects do? all the geo you need. 15 minutes ago, gc8 said: allows third parameter to define the locality I also completely forgot that 1 Share this post Link to post Share on other sites
gc8 979 Posted April 24, 2020 3 minutes ago, Dedmen said: all the geo you need. should probably switch to simpleobject creation then in my mission where I need to get the vehicles size, if it's faster? Share this post Link to post Share on other sites
Dedmen 2716 Posted April 24, 2020 Just now, gc8 said: should probably switch to simpleobject creation then in my mission where I need to get the vehicles size, if it's faster? yes faster and more efficient 1 Share this post Link to post Share on other sites