This is not the building I'm going to use to show you how to do it in this tut, but I'm just going to show you this one as an exsample of one I have done earlyer.
Basicly you can add all the objects in the object editor, to change this building, from this:
To this:
Diffrences being the 2nd part (the balconey) has been attached as a child, and also 6 ladders thou you can only see one of the ladders in the 2nd pic.
Thou as I have already done that building, I am going to use this building as an exsample:
Before I start this tut is very simple and it shouldnt take very long to get to grips with it, I only just had my first go at this last night before going to bed and did 2 buildings
Tools you will need:
- BF2 Editor
- Text Editor (I would use the Crimson Editor for this task since it reloads files etc. download: http://www.crimsoneditor.com/ and the BF2 plugin: http://www.filecloud.com/files/file.php ... _id=126906)
This is important so that you do not have to reload the editor every time you change something in the code by hand.
Go to Tools>Options at the top of the editor
Exspand the "ReloadFileSettings" and inside the check every box so it looks like this:
Then click ok to apply the settings.
Step 2: Setting up the static so it can take children.
First open up the .con file of your staticobject with your text editor (I would use the Crimson Editor).
Look/Search for the line "ObjectTemplate.create SimpleObject". After you have found it, we want to change this object from a SimpleObject to a Bundle, so just replace "ObjectTemplate.create SimpleObject" with "ObjectTemplate.create Bundle" and save the .con file, then you can close it.
The Editor may ask at this point if you want to reload the object, you can ignore it for the time being and leave it, or press yes.
Step 3: Adding a child.
Open up the .tweak of your staticobject with your text editor (this is the one you really want the Crimson Editor for).
Now I want to add a "ladder_3m" to my static, so all I need to do is add these lines to the very bottom of my .tweak file.
Code: Select all
rem -------------------------------------
ObjectTemplate.addTemplate ladder_3m
rem -------------------------------------
Note: if you want to add anouther kind of static other than a ladder_3m, just find out its file name, and repalce the "ladder_3m" above with the file name of your object.
then save the .tweak and the editor should pop up a window asking if you want to reload the file, press yes.
Now if you look in the editor, you will noticed on the left in the recorces bar, that you now have your new object there.
Step 3: Putting the child in the correct spot.
At the moment the object is located at excatly 0/0/0 of the pearent object, as we have not yet defeined any cordinets for it to be in, it also has a 0/0/0 rotation as we have not defeind any rotation as well.
To put the object into the correct postion, simpley move it there and when its set, save the object.
When you save the object, if you are using the Crimson Editor it will ask you if you want to reload the file, click yes and it will update it with the changes, if you are using notepad or something you will need to exit notepad, and reload the .tweak file.
If you look back you will notice it has added a new line under your new object with its x/y/z cordinets.
Now That I have done the first ladder, time to move onto the next ladder. I want to put a ladder at the back of this building, to do this we simpley follow the same prcedia as above, but now we want to also rotate the ladder 180degs. This ladder is longer so I want to add a ladder_7m.
Under the last object, just add the new object so it looks like this:
Now to rotate it 180degs, simpley add this line of code under the new object.
Code: Select all
ObjectTemplate.setRotation 180/0/0
Now save the .tweak up, and click yes for the editor to reload the file.
Now you will find your new object sitting in the middle of your building, that now just needs moving into postion.
When the new object is in postion, just save it up again, and keep on doing this till all your new objects are on your building
Now Mappers can simpley drag and drop the pearent object into there map and will not need to place all the ladders, 2nd parts to the objects etc into there map wasting lots of time.
Note: only 2 objects placed on the left in the recorces tab.
Now just to make sure you guys know, if the mapper wants to for w/e reason, take off all the children from an object and maybe place them by hand in other areas, or so he dont have any ladders etc on them this is easily done by just checking this box when you have the object selected in the level editor, in the tweaker bar: DisableChildren
Which will resault in all the objects being removed, left with only the pearnt.
Then you can go about in the level editor adding them back by hand if you wanted to, just for an exsample im going to add the balconey number 2 onto it
Note: there are no ladders on the side.
Hope this tut helps!
Credit to matt.b for the statics, they are not my statics