the first Nimitz_F14Spawner is the F14 on the left (standing on the deck looking towards the bow). the first number in the setPosition is the x offset releative to the center of the Nimitz. Change it to -5, so now the code looks like:
now if you load up Wake CTF (which spawns the Nimitz), you'll see A10's instead of F14's. Remember there are several variants of the Nimitz, so make sure you're spawning the one your editing!
Now you'll notice the A-10's are floating about a half a meter above the carrier. There are two ways to fix this; either change the spawnOffset above in the objects.rfa (for example, the above would be changed to:)
WARNING: If you run into problems with this, remember a few things, all vehicles vary in sizes, so be careful that if you swap out a chopper for a plane or something, that if the new vehicle is taller, it may spawn halfway inside the deck. So when you go into the map, there's nothing there. Just adjust the spawnOffset so it spawns higher (increase the second number).
Also, some vehicle spawners dont have the "ObjectTemplate.holdObject 1". if you need it, add it (some vehicles will start vibrating wildly with it or without it.. you'll hafto play with it to find out what you need for different vehicles).
2) Changing on a map for map basis (editing the Objects.rfa)
First thing that needs to be done is the addTemplates in the Objects.rfa need to be remmed out. So go into OBJECTS\vehicles\Sea\Nimitz\Objects.con, and put a beginrem and endrem before and after the block of addtemplates in the nimitz that you want to do this to.
For Example, lets say we want to do this to the regular Nimitz. If you down about half way, you'll see:
Code:
ObjectTemplate.create PlayerControlObject Nimitz
then under that, you'll see all the addtemplate's for the vehicles and soldier spawns. rem them out so that the code looks like this:
now if you load up Wake CTF, you'll notice you have an empty carrier. To get the vehicles back, Active the Nimitz in your ObjectSpawnTemplates.con and put the block of code above back in like so:
The nice thing about this method is you can change vehicles on a map per map basis, so in Wake, you'll notice there already exists a spawner for the A10 called DiveBomberSpawner. We could replace one of the F14's for an A10 like so:
notice i dropped the z down .7 meters and also moved it to the left so it wont hit the F14 on the right.
Also notice i had to set the team to 2 on the DiveBomberSpawner objectspawner. You can do this with the Active like i did above, or you can just go up to where the DiveBomberSpawner is defined and do it there. the down side of this is that you wont get the SU-25 when the central flag is taken. So make sure you acccount for this (use another spawner or something).
If you want to change properties on one of the normal carrier spawners, just active the spawner and make your changes, for example, if you want to decrease the min and max spawn times on the F14's, put this at the end of your ObjectSpawnTemplates.con:
For example, if you want to change the F14 spawner so that it spawns the A10, the following code at the end of your ObjectSpawnTemplates.con will work:
If you want to add more vehicles to the carrier, just addtemplate an existing vehicle spawner again. Since Nimitz_F14Spawner is an existing vehicle spawner, lets addTemplate it again so it's right behind the front two existing ones. Still working on the Nimitz as we have been above, go down to where you see the addTemplates for the existing vehicles (looks like this:
We're going to add the new F14 spawner 20 meters behind the first one above (we can put this anywhere... so lets do it right after the AV8Spawner with a comment) so now your code looks like this:
The new code is in RED so you can see. Notice the Y coordinate is 13.3961.. this will put it 20 meters behind the first F14. Load up Wake and you'll see the new fighter.
On a per map basis
Doing the same thing above but only doing it in the map itself (without having to edit Objects.rfa) is straight forward. Just ObjectTemplate.Active Nimitz and add the same code as above. You can do this in your map's ObjectSpawnTemplates.con. For example, add this code at the end of your ObjectSpawnTemplates.con in Wake Conquest:
Code:
rem ***** New F14 ******
ObjectTemplate.Active Nimitz
ObjectTemplate.addTemplate Nimitz_F14Spawner
ObjectTemplate.setPosition 1.0203/21.70/13.3961
ObjectTemplate.setRotation -1.482/0/0
If you do this on a per map basis, then all the spawners defined in ObjectSpawnTemplates.con is fair game as well (it doesn't hafto be the nimitz vehicle spawners). On the other hand, if you directly edit the Objects.rfa, then you can only use vehicle spawners that are defined in objects.rfa (your not restricted to the Nimitz spawners tho... for example, you could addTemplate the Shokaku vehicle spawners to the Nimitz as well if you wanted).