Moving Ship Soldier Spawns

Ask questions, discuss ideas, get answers
Post Reply
User avatar
Tuesday
Posts: 36
Joined: Fri Jul 09, 2010 3:39 pm
Location: UK
Contact:

Moving Ship Soldier Spawns

Post by Tuesday »

On coral sea I have added a Yamato and a PrinceOW and I would like to move the solider spawns on the both ships, I still want the soldier spawns to be on the ships but just in at a different position to the one they are currently in.

I added this to my ObjectSpawnTemplate.con in my coral sea patch file but it didn't seem to do anything.

Code: Select all

ObjectTemplate.Active SpawnPoint YamatoDriverSoldierSpawn
ObjectTemplate.setSpawnRotation 0/0/0
ObjectTemplate.setSpawnPositionOffset 11/0/-4
ObjectTemplate.setSpawnPreventionDelay 0
ObjectTemplate.setSpawnId 0
ObjectTemplate.setGroup 65
rem ObjectTemplate.setEnterOnSpawn 1
ObjectTemplate.setAIEnterOnSpawn 1
ObjectTemplate.setSpawnAsParaTroper 0
I want to change all the 3 soldier spawns on both ships but I did the YamatoDriverSoldierSpawn first as a test.

Can anyone help me with this? :(
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: Moving Ship Soldier Spawns

Post by freddy »

Its easy to do in objects.rfa but if you want to do it for just one map you have to removetemplate all the spawnpoints from each ship and then add them again where you want them. I think there is some tutorial how to do it somewhere, try search on removeTemplate

I have never got the setSpawnPositionOffset code to work in a map-mod, dunno if it works in objects.rfa

edit: motokos method in this thread may be easier and better
viewtopic.php?f=6&t=437&p=2920&hilit=re ... late#p2920
User avatar
Tuesday
Posts: 36
Joined: Fri Jul 09, 2010 3:39 pm
Location: UK
Contact:

Re: Moving Ship Soldier Spawns

Post by Tuesday »

I decided to go with what you suggested and remove the spawn templates.

Going off the Yamato/Objects.con in the objects.rfa it looked like I would need to remove templates 1,2 & 3.

Code: Select all

rem *** YamatoComplex ***
ObjectTemplate.create Bundle YamatoComplex
rem ObjectTemplate.setNetworkableInfo YamatoBodyInfo
ObjectTemplate.geometry Yamato_hull_M1
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.hasResponsePhysics 1
rem -------------------------------------
ObjectTemplate.addTemplate YamatoDriverSoldierSpawn
ObjectTemplate.setPosition 0/12.5/3.5
ObjectTemplate.addTemplate YamatoSoldierSpawn
ObjectTemplate.setPosition -18.6/12.5/-44.999
ObjectTemplate.addTemplate YamatoSoldierSpawn
ObjectTemplate.setPosition 18.6/12.5/-44.999
However when I did that it didn't remove the YamatoDriverSoldierSpawn.

So I removed the "ObjectTemplate.removeTemplate 1" that I had in my patch file as I thought it had failed to remove a soldierspawn, it turns out it hadn't.

There are actually three YamatoSoldierSpawn and two of them share the same position (-18.6/12.5/-44.999).

I ended up adding this to my ObjectSpawnTemplate.con

Code: Select all

ObjectTemplate.Active YamatoComplex
ObjectTemplate.removeTemplate 3
ObjectTemplate.removeTemplate 2
ObjectTemplate.removeTemplate 1
ObjectTemplate.addTemplate YamatoSoldierSpawn
ObjectTemplate.setPosition 12.2/12.5/-33.6
ObjectTemplate.setRotation -140/0/0
ObjectTemplate.addTemplate YamatoSoldierSpawn
ObjectTemplate.setPosition 7.4/12.5/-45.6
ObjectTemplate.setRotation -30/0/0
ObjectTemplate.addTemplate YamatoSoldierSpawn
ObjectTemplate.setPosition -12.6/12.5/-32
ObjectTemplate.setRotation -150/0/0
I now have 3 different YamatoSoldierSpawn at the back of the ship in the positions I want as well as to the YamatoDriverSoldierSpawn which I was not able to move.

I would still like to be able to move the YamatoDriverSoldierSpawn though but I have no idea what template it is? :?
Old Man River
Posts: 77
Joined: Mon Jul 30, 2012 5:12 am

Re: Moving Ship Soldier Spawns

Post by Old Man River »

I remember when I did this that if you dont remove the original templates they remain there along with your added ones, also that when you count templates the first is zero ie 0,1,2,3 you may have started with 1 and got count wrong so you are missing 4th thing not driver in complex not first 3 which is why driver is still there

And yes you do it in complex by remove template and add new active template soldier spawns
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: Moving Ship Soldier Spawns

Post by freddy »

Tuesday wrote:I would still like to be able to move the YamatoDriverSoldierSpawn though but I have no idea what template it is? :?
It starts with template 0 so a small change in your code and its all there

example

Code: Select all

ObjectTemplate.Active YamatoComplex
ObjectTemplate.removeTemplate 2
ObjectTemplate.removeTemplate 1
ObjectTemplate.removeTemplate 0

ObjectTemplate.addTemplate YamatoDriverSoldierSpawn  <-----------
ObjectTemplate.setPosition 12.2/12.5/-33.6
ObjectTemplate.setRotation -140/0/0

ObjectTemplate.addTemplate YamatoSoldierSpawn
ObjectTemplate.setPosition 7.4/12.5/-45.6
ObjectTemplate.setRotation -30/0/0
ObjectTemplate.addTemplate YamatoSoldierSpawn
ObjectTemplate.setPosition -12.6/12.5/-32
ObjectTemplate.setRotation -150/0/0
Theres another way to do it but i havent tested that myself, i just saw it somewhere.

Code: Select all

ObjectTemplate.Active YamatoComplex
ObjectTemplate.removeTemplate YamatoDriverSoldierSpawn
User avatar
Tuesday
Posts: 36
Joined: Fri Jul 09, 2010 3:39 pm
Location: UK
Contact:

Re: Moving Ship Soldier Spawns

Post by Tuesday »

I have now been able to move the YamatoDriverSoldierSpawn, thanks for the help :)
Post Reply