Jump to content
champ-1

Bounding box size from config

Recommended Posts

I'm new to Arma config files and still confused about many things, so I have a question:

Basically I want to know size of the object before I spawn it. This is similar to the command "boundingBox" but from config files. It seems there is no documentation on this case. At least I haven't found anything.

Also, I'm looking for a way to know how many building positions has given building without having actual object on the map.

 

Alternatively, I'm thinking of running createVehicleLocal and using some of the commands to get the information I need, but it's not ideal really.

Share this post


Link to post
Share on other sites

i think both boundingbox and buildingpos are based on the actually model being searched. i could be wrong but i don't think these informations can be extracted any other way. it might work with createsimpleobject, if you want to do it in the cheapest way possible. but only testing will give you that info.

 

you could cache the data at mission start. it could become quite heavy though, if you need it for all vehicles.

Share this post


Link to post
Share on other sites
16 minutes ago, bad benson said:

i think both boundingbox and buildingpos are based on the actually model being searched. i could be wrong but i don't think these informations can be extracted any other way. it might work with createsimpleobject, if you want to do it in the cheapest way possible. but only testing will give you that info.

 

you coudl cache the data at mission start. you could become quite heavy if you need it for all vehicles.

Yeah, thats what I thought.

But I think createVehicleLocal better since it doesn't sync across clients in multiplayer.

Share this post


Link to post
Share on other sites

How many different objects do you have? You can always generate your own config file of sizes for all models in the game once and then use it.

Share this post


Link to post
Share on other sites
53 minutes ago, killzone_kid said:

How many different objects do you have? You can always generate your own config file of sizes for all models in the game once and then use it.

Well, I want to select all vehicles from config and then split them in different categories based of height.

What kind of config are you talking about? Just some variables?

Share this post


Link to post
Share on other sites

yea you can easily create your own config classes and have them have parameters you made up. works great. and then you can retrieve stuff ingame using the configfile command.

 

i think he means you would gather the data via script ingame, save it to file (copytoclipboard for example) and then make it a config. i wonder if you can put that stuff into the mission configfile. never tried that.

 

EDIT: hm. looks promising. https://community.bistudio.com/wiki/missionConfigFile

 

 i wonder if file size matters

Share this post


Link to post
Share on other sites
24 minutes ago, bad benson said:

i wonder if you can put that stuff into the mission configfile

 

you can, mission config is treated just like normal config. However it would be better to make a script array with all the data and use that, would probably be much quicker. Config at runtime is expensive. for example

["class", [size], "class", [size]....] //so you could find class and +1 it to get size

 

Share this post


Link to post
Share on other sites

Bear in mind that the bounding box (real) is much larger for some ruined objects that their unruined equivalents - even if visually it shouldn't be.

 

Also, some objects have a weirdly big bounding box - use KK's BB object utility if you want to have a check through and see the quirks for yourself.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×