Page 1 of 1

ObjectTemplate.setPosition ?

Posted: Wed Mar 03, 2010 3:09 pm
by anselmus
I would like to put a AmmoBox in the surface of a submarine (renamed), however, how do I find the correct position to put (ObjectTemplate.setPosition)?
I know I should add information in the complex structure:

rem *** *** GatoComplex
ObjectTemplate.create Bundle GatoComplex
.......
ObjectTemplate.addTemplate AmmoBox
ObjectTemplate.setPosition ?????

Sorry my english!

Re: ObjectTemplate.setPosition ?

Posted: Wed Mar 03, 2010 4:15 pm
by fo0k
Either open the sub model in max and find the exact co-ordinates or just take a guess at it then tweak until it's right :)
at a pure guess I'd start with 0/6/4

I'm guessing that 6 is enough to be above the hull and get you a good starting point to tweak it from.

Re: ObjectTemplate.setPosition ?

Posted: Wed Mar 03, 2010 7:07 pm
by tekk
anselmus wrote:I would like to put a AmmoBox in the surface of a submarine (renamed), however, how do I find the correct position to put (ObjectTemplate.setPosition)?
I know I should add information in the complex structure:

rem *** *** GatoComplex
ObjectTemplate.create Bundle GatoComplex
.......
ObjectTemplate.addTemplate AmmoBox
ObjectTemplate.setPosition ?????

Sorry my english!
Also the code will be like this

Code: Select all

ObjectTemplate.active GatoComplex
ObjectTemplate.addTemplate AmmoBox
ObjectTemplate.setPosition 0/6/4
And yes as foOk said, its tweaking the positions from there till its where you want it, goodluck :)

Re: ObjectTemplate.setPosition ?

Posted: Sun Mar 07, 2010 11:53 am
by RuBBa_cHiKiN
Can't you just load the Gato's main mesh in 3DSMAX, load the ammbox, then clone the ammobox the amount of times needed, place them, then just copy the coordinates of the ammoboxes to your con file? To view coordinates, right-click and hit the little box icon beside the "move" option. When copying coordinates over, remember that you have to shift the decimal over one place to the left if copying from max to con. One to the right if the other way. This means that it'll take a lot less time to get your positioning right.

Also, from what I've noticed, the coordinates for an objecttemplate go "objectTemplate.setPosition X/Z/Y".

Re: ObjectTemplate.setPosition ?

Posted: Sun Mar 07, 2010 8:40 pm
by Apache Thunder
I think someone at the old SSM site posted a link to a old 3DSMax tool made by rexman. It had the capability of importing and exporting object positions including vehicle configurations. It can't really produce anything you can directly use. But the cooridents it makes should work exactly as you need. I think freddy was the one who originally posted it somewhere. Maybe he'll pop in and remind us where to find it. :D

Re: ObjectTemplate.setPosition ?

Posted: Mon Mar 08, 2010 7:46 am
by Senshi
If you have 3dsmax:

Add the ammobox to your vehicles objects.con in the "Complex"-Part (position completely irrelevant, best is something that will be outside the vehicle, of course. Say: 5/5/5 perhaps, or more if you have a big vehicle). Add as many as you want. Save and pack your .rfa
Fire up 3dsmax.
Choose Vehicle editing from the regular BFMDT 3dsmax tools
choose your mod, choose your vehicle, click "Import"
Now you get the vehicle with ALL objects that are addtemplated to it including correct positions and rotations. And the really cool part is yet to come.
Just move the ammoboxes wherever you want them to be precisely, rotate them etc. . Now go back to the BFMDT 3dsmax tools and simply "Save Vehicle". Now all your alterations in 3dsmax to positions and rotations etc. will be saved directly to the rfa. But that is all! You can NOT add objects with this method, you can only update existing objects' positions and rotations in a vehicle!