ObjectTemplate.setPosition ?

Ask questions, discuss ideas, get answers
Post Reply
anselmus
Posts: 82
Joined: Sun Oct 18, 2009 6:42 pm

ObjectTemplate.setPosition ?

Post 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!
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: ObjectTemplate.setPosition ?

Post 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.
tekk
Posts: 171
Joined: Fri Dec 11, 2009 6:12 pm

Re: ObjectTemplate.setPosition ?

Post 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 :)
Nodbrother- "getting whiped every single game by some over-active 9 year old kid with too much spare time and a reaction time that is a third of yours."
RuBBa_cHiKiN
Posts: 25
Joined: Sun Oct 18, 2009 12:55 pm

Re: ObjectTemplate.setPosition ?

Post 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".
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: ObjectTemplate.setPosition ?

Post 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
ImageImageImage
I have cameras in your head!
User avatar
Senshi
Posts: 697
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany
Contact:

Re: ObjectTemplate.setPosition ?

Post 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!
Post Reply