How to add a spawn point for both sides[]
by tanfhltu
This will not add a control point... big difference (still working on that one...). These instructions will only allow you to add a spawn point with multiple soldier facings for each team.
There are several ways to accomplish this:
1) Using the Mi8 and/or MH-53
2) Using SpawnPoints of Other Vehicles
1) Using the HiP and MH-53[]
In order to accomplish this, the Mi8 must be available for the opposition side, and the MH-53 must be available for the coolition side (note that if either of these units are being used, then all the new spawn points and the one's on the Mi8 or MH53 for that side will be like one spawn area, in other words, 1 white dot)
Coolition Spawn Points
If you look at the objects.con for the MH-53 (located in the objects.rfa file), just past the halfway point, you'll see a section that starts with:
rem *** MH53_Passenger3_PCO *** ObjectTemplate.create PlayerControlObject MH53_Passenger3_PCO ObjectTemplate.setNetworkableInfo H53_body_info ObjectTemplate.aiTemplate MH53Passenger3 rem --------------------------------- ObjectTemplate.addTemplate MH53PassCommon ObjectTemplate.setPosition -1.497/-0.265/-3.065 ObjectTemplate.setRotation 90/0/0 |
This object has MH53PassCommon "hooked" to it. Just before this entry is the definition of MH53PassCommon:
rem *** MH53PassCommon *** ObjectTemplate.create Bundle MH53PassCommon ObjectTemplate.addTemplate MH53PassCamera ObjectTemplate.setPostion 0/0.35/0 ObjectTemplate.addTemplate MH53PassSeat ObjectTemplate.addTemplate MH53PassEntry ObjectTemplate.addTemplate MH53SoldierSpawn |
The MH53SoldierSpawn is our spawn point, therefore all we need to do is add MH53_Passenger3_PCO as many times as we want to an area of our map. Note the setPosition -1.497/-0.265/-3.065 and setRotation 90/0/0. This will be relative to where you place MH53_Passenger3_PCO on your map.
So lets use DesertShield CTF as an example. We would like to add all the original spawn points for the coolition at the desert outpost. First, we'll need to change a spawner. There are no f16's or mig29's in CTF, so in ctf\ObjectSpawnTemplates.con, we'll change fighterspawner to be:
objecttemplate.create objectspawner fighterspawner objecttemplate.setobjecttemplate 2 MH53_Passenger3_PCO objecttemplate.setobjecttemplate 1 mig29 objecttemplate.minspawndelay 9999 objecttemplate.maxspawndelay 9999 objecttemplate.spawndelayatstart 0 objecttemplate.timetolive 9999 objecttemplate.distance 9999 objecttemplate.damagewhenlost 10 |
Be sure to set the min/maxspawndelay, ttl, and distance to 9999.
Before we move on to these spawn locations, there are some more settings to add to the bottom of this file:
ObjectTemplate.Active MH53SoldierSpawn ObjectTemplate.setEnterOnSpawn 0 ObjectTemplate.Active MH53PassEntry ObjectTemplate.setEntryRadius 0 ObjectTemplate.Active MH53PilotEntry ObjectTemplate.setEntryRadius 0 |
Although these *shouldn't* matter, it's probly best to tie up these loose ends. These settings prevent anyone from entering the MH-53, and will also force a spawner to be outside the MH-53.
Now look at Conquest\SoldierSpawns.con file. The coordinates of all of the original spawns are at:
object.create outpost_spawn1 object.absoluteposition 1030.27/83.22/787.27 object.rotation 92.28/0/0 rem rem *** *** rem object.create outpost_spawn2 object.absoluteposition 1032.91/83.23/783.1 object.rotation -37.98/0/0 rem rem *** *** rem object.create outpost_spawn3 object.absoluteposition 1025.6/83.02/809.73 object.rotation 123.22/0/0 rem rem *** *** rem object.create outpost_spawn4 object.absoluteposition 1059.61/83.02/779.07 object.rotation -35.64/0/0 rem rem *** *** rem object.create outpost_spawn5 object.absoluteposition 1045.18/83.02/781.03 object.rotation 0/0/0 |
Now, if we didn't have the setPosition/setRotation set on our soldier spawner, then we could just create fighterspawner's at all of these coordinates. But because things are offset, we need to do the following:
If a coordinate is x/z/y, we need to add 1.497 to x, 0.265 to z, and 3.065 to y. Also, all rotations need to be countered by 90 degrees. This will give us the following results, which we will put at the end of ctf\ObjectSpawns.con
rem *** cofor new spawn *** Object.create fighterspawner Object.absolutePosition 1031.767/83.485/790.335 Object.rotation 2.28/0/0 Object.setOSId 2 Object.setTeam 2 Object.create fighterspawner Object.absolutePosition 1034.407/83.495/786.165 Object.rotation -127.98/0/0 Object.setOSId 2 Object.setTeam 2 Object.create fighterspawner Object.absolutePosition 1027.097/83.285/812.795 Object.rotation 33.22/0/0 Object.setOSId 2 Object.setTeam 2 Object.create fighterspawner Object.absolutePosition 1061.107/83.285/782.135 Object.rotation 125.64/0/0 Object.setOSId 2 Object.setTeam 2 Object.create fighterspawner Object.absolutePosition 1046.677/83.285/794.095 Object.rotation -90/0/0 Object.setOSId 2 Object.setTeam 2 |
Opposition Spawn Points
Now as for the opposition side... well.. they already have two Mi8s, so we can't do the same thing with them. We would either need to remove the existing Mi8's to free up their soldier spawn, or someone needs to find a new way to make new spawn points (I'm hoping the ladder!).
but anyways, if you wanted to use the Mi8's soldier spawn, and you remove the existing Mi8's from the map, then look at the Mi8's objects.con in the objects.rfa file, you'll see the lines that start with:
ObjectTemplate.create PlayerControlObject Mi8_Pass1 ObjectTemplate.setNetworkableInfo Mi8_body_info ObjectTemplate.aiTemplate Mi8Passenger3 rem --------------------------------- ObjectTemplate.addTemplate lodMi8Cockpit ObjectTemplate.setPosition 0/1/7 ObjectTemplate.addTemplate Mi8PassCommon ObjectTemplate.setPosition -.6609/.588/6.9962 ObjectTemplate.setRotation 90/0/0 ObjectTemplate.addTemplate Mi8Entry ObjectTemplate.addTemplate Mi8SoldierSpawn |
Mi8_Pass1 is what we want.. notice it has Mi8SoldierSpawn hooked right to it. Add the following lines to the bottom of this file:
ObjectTemplate.Active Mi8SoldierSpawn ObjectTemplate.SetEnterOnSpawn 0 ObjectTemplate.Active Mi8Entry ObjectTemplate.setEntryRadius 0 |
Now Change ctf\ObjectSpawnTemplates.con to read this this for the fighterspawner:
objecttemplate.create objectspawner fighterspawner objecttemplate.setobjecttemplate 2 MH53_Passenger3_PCO objecttemplate.setobjecttemplate 1 Mi8_Pass1 |
Notice there is no offset for the Mi8's spawner, so we'll just use the same coordinates as the conquest version uses. We're going to spawn at the eastpoint spawns. Using those coordinates, we'll make the following additions to our ctf\ObjectSpawns.con:
rem *** cofor new spawn *** Object.create fighterspawner Object.absolutePosition 1191.05/81.59/1196.85 Object.rotation 97.04/0/0 Object.setOSId 1 Object.setTeam 1 Object.create fighterspawner Object.absolutePosition 1230.26/81.78/1151.08 Object.rotation 91.8/0/0 Object.setOSId 1 Object.setTeam 1 Object.create fighterspawner Object.absolutePosition 1196.13/81.8/1151.22 Object.rotation 91.98/0/0 Object.setOSId 1 Object.setTeam 1 Object.create fighterspawner Object.absolutePosition 1241.54/81.61/1175.2 Object.rotation -135.8/0/0 Object.setOSId 1 Object.setTeam 1 Object.create fighterspawner Object.absolutePosition 1224.17/81.7/1209.68 Object.rotation -148.94/0/0 Object.setOSId 1 Object.setTeam 1 Object.create fighterspawner Object.absolutePosition 1252.7/87.83/1212.81 Object.rotation -152.76/0/0 Object.setOSId 1 Object.setTeam 1 |
2) Using the Soldier Spawners of Other Vehicles[]
What if the HiP and/or MH-53 is already in the map? Or what if you want more than two spawn point groups?
These things are possible, depending on how badly you want such things. The nice thing about the HiP and MH-53 is that the SpawnPoints were addTemplate'ed to child PCO's, and we just spawned those child PCOs. For the other vehicles, the SpawnPoints are addTemplate'ed to the Complex bundle of the object, which sucks. Basically, what we can do is rem out the SpawnPoints on vehicles in the objects.rfa, and then use them for spawn points in maps where we need them, or, in cases where we want to use the vehicle, we add them back to that vehicle.
For example, if you look at the Shokaku's objects.con file, you'll notice there are three soldier spawns defined (midway down):
rem *** ShokakuDriverSoldierSpawn *** ObjectTemplate.create SpawnPoint ShokakuDriverSoldierSpawn ObjectTemplate.setSpawnRotation 0/0/0 ObjectTemplate.setSpawnPositionOffset 0/0/0 ObjectTemplate.setSpawnPreventionDelay 0 ObjectTemplate.setSpawnId 0 ObjectTemplate.setGroup 75 rem ObjectTemplate.setEnterOnSpawn 1 ObjectTemplate.setAIEnterOnSpawn 1 ObjectTemplate.setSpawnAsParaTroper 0 rem *** ShokakuDaihatsuSoldierSpawn *** ObjectTemplate.create SpawnPoint ShokakuDaihatsuSoldierSpawn ObjectTemplate.setSpawnRotation 0/0/0 ObjectTemplate.setSpawnPositionOffset 0/0/0 ObjectTemplate.setSpawnPreventionDelay 0 ObjectTemplate.setSpawnId 0 ObjectTemplate.setGroup 76 rem ObjectTemplate.setEnterOnSpawn 0 ObjectTemplate.setAIEnterOnSpawn 1 ObjectTemplate.setSpawnAsParaTroper 0 rem *** ShokakuAirCraftSoldierSpawn *** ObjectTemplate.create SpawnPoint ShokakuAirCraftSoldierSpawn ObjectTemplate.setSpawnRotation 0/0/0 ObjectTemplate.setSpawnPositionOffset 0/0/0 ObjectTemplate.setSpawnPreventionDelay 0 ObjectTemplate.setSpawnId 0 ObjectTemplate.setGroup 77 ObjectTemplate.setAIEnterOnSpawn 0 ObjectTemplate.setSpawnAsParaTroper 0 |
These SpawnPoints are addTemplate'ed to the ShokakuComplex bundle earlier in the file like this:
ObjectTemplate.create Bundle ShokakuComplex rem ObjectTemplate.setNetworkableInfo ShokakuBodyInfo ObjectTemplate.geometry Shokaku_M1 ObjectTemplate.hasCollisionPhysics 1 ObjectTemplate.hasResponsePhysics 1 ObjectTemplate.hasMobilePhysics 1 rem ------------------------------------- ObjectTemplate.addTemplate ShokakuDriverSoldierSpawn ObjectTemplate.setPosition 8.5/13/35 ObjectTemplate.addTemplate ShokakuDriverSoldierSpawn ObjectTemplate.setPosition 8.5/13/38 ObjectTemplate.addTemplate ShokakuDaihatsuSoldierSpawn ObjectTemplate.setPosition 5.6/3.47/-122.7 ObjectTemplate.addTemplate ShokakuDaihatsuSoldierSpawn ObjectTemplate.setPosition -5.6/3.47/-122.7 |
The next few lines also addTemplate the vehicle spawners as well. What we're going to do is rem out all of these lines (including the vehicles, which I will explain why below) so that this section looks like this:
rem *** ShokakuComplex *** ObjectTemplate.create Bundle ShokakuComplex rem ObjectTemplate.setNetworkableInfo ShokakuBodyInfo ObjectTemplate.geometry Shokaku_M1 ObjectTemplate.hasCollisionPhysics 1 ObjectTemplate.hasResponsePhysics 1 ObjectTemplate.hasMobilePhysics 1 rem ------------------------------------- rem --- REM'ed out... add back in for maps with shokaku beginrem ObjectTemplate.addTemplate ShokakuDriverSoldierSpawn ObjectTemplate.setPosition 8.5/13/35 ObjectTemplate.addTemplate ShokakuDriverSoldierSpawn ObjectTemplate.setPosition 8.5/13/38 ObjectTemplate.addTemplate ShokakuDaihatsuSoldierSpawn ObjectTemplate.setPosition 5.6/3.47/-122.7 ObjectTemplate.addTemplate ShokakuDaihatsuSoldierSpawn ObjectTemplate.setPosition -5.6/3.47/-122.7 ObjectTemplate.addTemplate ShokakuAirCraftSoldierSpawn ObjectTemplate.setPosition -6.779/13.1/-43 ObjectTemplate.addTemplate ShokakuAirCraftSoldierSpawn ObjectTemplate.setPosition 1.9/13.5/-36 ObjectTemplate.addTemplate ShokakuMigSpawner ObjectTemplate.setPosition -2.899/13.7/-47 ObjectTemplate.setRotation 0/0/0 ObjectTemplate.addTemplate ShokakuHindSpawner ObjectTemplate.setPosition 7.2/14/-30 ObjectTemplate.setRotation 0/-3/0 ObjectTemplate.addTemplate ShokakuDaiHatsuSpawner ObjectTemplate.setPosition -10.159/2.46/-117.394 ObjectTemplate.setRotation -10/0/0 ObjectTemplate.addTemplate ShokakuDaiHatsuSpawner ObjectTemplate.setPosition 10.159/2.64/-117.394 ObjectTemplate.setRotation 10/0/0 endrem |
Now save and repack your Objects.rfa. You also may want to copy and paste that code above to a text file somewhere, because you will need it come time that you want the Shokaku back to normal
First, Getting the Vehicle Back to Normal[]
Before I go on explaining how to use these SpawnPoints, let me explain how to get the vehicle back to normal in maps where it's being used.
If you do nothing, then you'll still get the vehicle, but you'll get it without any SpawnPoints. In the example above, if we wanted to add back that block of code we remmed out, we can ObjectTemplate.Active the ShokakuComplex Bundle, and then just addTemplate everything back in (this can be done at the end of you ObjectSpawnTemplates.con in your map rfa):
rem --- Get our SpawnPoints and Vehicles Back --- ObjectTemplate.Active ShokakuComplex ObjectTemplate.addTemplate ShokakuDriverSoldierSpawn ObjectTemplate.setPosition 8.5/13/35 ObjectTemplate.addTemplate ShokakuDriverSoldierSpawn ObjectTemplate.setPosition 8.5/13/38 ObjectTemplate.addTemplate ShokakuDaihatsuSoldierSpawn ObjectTemplate.setPosition 5.6/3.47/-122.7 ObjectTemplate.addTemplate ShokakuDaihatsuSoldierSpawn ObjectTemplate.setPosition -5.6/3.47/-122.7 ObjectTemplate.addTemplate ShokakuAirCraftSoldierSpawn ObjectTemplate.setPosition -6.779/13.1/-43 ObjectTemplate.addTemplate ShokakuAirCraftSoldierSpawn ObjectTemplate.setPosition 1.9/13.5/-36 ObjectTemplate.addTemplate ShokakuMigSpawner ObjectTemplate.setPosition -2.899/13.7/-47 ObjectTemplate.setRotation 0/0/0 ObjectTemplate.addTemplate ShokakuHindSpawner ObjectTemplate.setPosition 7.2/14/-30 ObjectTemplate.setRotation 0/-3/0 ObjectTemplate.addTemplate ShokakuDaiHatsuSpawner ObjectTemplate.setPosition -10.159/2.46/-117.394 ObjectTemplate.setRotation -10/0/0 ObjectTemplate.addTemplate ShokakuDaiHatsuSpawner ObjectTemplate.setPosition 10.159/2.64/-117.394 ObjectTemplate.setRotation 10/0/0 |
OK, now to add the spawn points[]
Now to actually add the spawnpoints, it's real simple. Just Object.Create one of the three SpawnPoints for every spawn you want. There is one catch tho! You will need to hide the vehicle somewhere on the map that those spawnpoints originally belonged to (don't ask me why... it's just the way of things).
Lets say for example I want to add two spawn groups, with three spawns each (two white circles with 3 possible facings each). Som sample code could look like this:
rem --- Spawn Group #1 Object.create ShokakuDriverSoldierSpawn Object.absolutePosition 1251.57/74.277/922.027 Object.rotation -90/0.00/0.00 Object.create ShokakuDriverSoldierSpawn Object.absolutePosition 1222.81/73.4/942.8 Object.rotation 180/0.00/0.00 Object.create ShokakuDriverSoldierSpawn Object.absolutePosition 1201.19/73.3/902.44 Object.rotation 90/0.00/0.00 rem --- Spawn Group #2 Object.create ShokakuDaihatsuSoldierSpawn Object.absolutePosition 993.7/73.2/1171.7 Object.rotation 180/0.00/0.00 Object.create ShokakuDaihatsuSoldierSpawn Object.absolutePosition 975.01/73.35/1136.13 Object.rotation 80/0.00/0.00 Object.create ShokakuDaihatsuSoldierSpawn Object.absolutePosition 974.7/73.35/1121.41 Object.rotation 80/0.00/0.00 |
Of course, you would use your own coordinates.
Adding the Vehicle that originally spawned these soldiers[]
For some reason, in the example above, we gotta add the Shokaku to the map in order for the soldier spawnspoints to actually show. I usually place them 750 meters in the air in the far corner of the map. For example, in my Lost Village CTF modded map, I used the following code:
rem ----------------------------------------- Object.create CarrierSpawner Object.absolutePosition 843/750/543 Object.rotation 0.00/0.00/0.00 Object.setOSId 2 Object.setTeam 2 ObjectTemplate.HoldObject 1 |
This placed it way high above the CoFor choppers. Note the "ObjectTemplate.HoldObject 1". You need this line so that the carrier is held in place.
Also notice that I had to use a spawner in ObjectSpawnTemplates.con for the Shokaku (in this case, I used CarrierSpawner).
Of course, now you can see why I remmed out the vehicles as well. It prevents i curious weener from choppering up to the carrier, and stealing an aircraft!
Also, for completeness, you may want to lock out anyone from getting into the carrier. Simply find the EntryPoint for the vehicle in question, objectTemplate.Active it, and place "objectTemplate.setEntryRadius 0" under it. For the Shokaku, that would be:
ObjectTemplate.Active ShokakuEntry ObjectTemplate.setEntryRadius 0 |