Page 1 of 2

possibility of making a flak carrier

Posted: Mon Jan 14, 2013 2:50 pm
by Pigauchiu
I started from market garden, what I tried:

Code: Select all

ObjectTemplate.create ObjectSpawner AAGunSpawner
ObjectTemplate.setObjectTemplate 2 
ObjectTemplate.setObjectTemplate 1 flak38
ObjectTemplate.MinSpawnDelay 40
ObjectTemplate.MaxSpawnDelay 80
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.TimeToLive 45
ObjectTemplate.Distance 40
ObjectTemplate.DamageWhenLost 10
ObjectTemplate.team 1
ObjectTemplate.holdObject 1

ObjectTemplate.Active HanomagComplex
ObjectTemplate.addTemplate AAGunSpawner
ObjectTemplate.setPosition 0/1.15/0.27
flak38 spawned on hanomag but it didnt follow hanomag when moved.

another trial had no effect:

Code: Select all

ObjectTemplate.Active HanomagComplex
ObjectTemplate.addTemplate flak38
ObjectTemplate.setPosition 0/1.15/0.27
the effect of third trial was the same as first one

Code: Select all

ObjectTemplate.create ObjectSpawner AAGunSpawner
ObjectTemplate.setObjectTemplate 2 
ObjectTemplate.setObjectTemplate 1 flak38
ObjectTemplate.MinSpawnDelay 40
ObjectTemplate.MaxSpawnDelay 80
ObjectTemplate.SpawnDelayAtStart 0
ObjectTemplate.TimeToLive 45
ObjectTemplate.Distance 40
ObjectTemplate.DamageWhenLost 10
ObjectTemplate.team 1
ObjectTemplate.holdObject 1

ObjectTemplate.Active Hanomag
ObjectTemplate.addTemplate AAGunSpawner
ObjectTemplate.setPosition 0/1.15/0.27
forth trial made the mg pco became position 3 and when i changed to position 2, client side crashed.

Code: Select all

ObjectTemplate.Active Hanomag
ObjectTemplate.addTemplate flak38
ObjectTemplate.setPosition 0/1.15/0.27
hope if anyone already have had working codes. :|

Re: possibility of making a flak carrier

Posted: Tue Jan 15, 2013 2:31 am
by Swaffy

Re: possibility of making a flak carrier

Posted: Tue Jan 15, 2013 3:25 am
by Vilespring
Whatever it is between moving AA guns and people, I did it. I, personally like replacing flak 38s with tigers with flak 38 turrets. Just mock my code and learn from my dumbness. Search a bit and many people come up with wonky ideas with issues.

want to see my fully finished RFA for my flak tiger?

Re: possibility of making a flak carrier

Posted: Tue Jan 15, 2013 6:22 am
by Swaffy
I thought it was a pretty nice idea, even the texture colors of the Tiger and Flak-38 fit together so it doesn't look out-of-place.

Re: possibility of making a flak carrier

Posted: Tue Jan 15, 2013 1:37 pm
by Pigauchiu
Vilespring wrote:Whatever it is between moving AA guns and people, I did it. I, personally like replacing flak 38s with tigers with flak 38 turrets. Just mock my code and learn from my dumbness. Search a bit and many people come up with wonky ideas with issues.

want to see my fully finished RFA for my flak tiger?
thanks for your work but my topic is a ssm.

actually my last trial was successful...on client side only. orz

Re: possibility of making a flak carrier

Posted: Thu Jan 17, 2013 5:30 am
by Old Man River
I added extra AA guns to carriers in coral once and it worked but I dont know if they would move with carriers as they are set in possition, to get it to work i replaced the unused landing craft spawner in complex template with AA gun, and off set them to correct position on carrier. Maybe their is something else that is on original vehicle that can be replaced by AA gun in complex so it locks on ?

Re: possibility of making a flak carrier

Posted: Sat Jan 19, 2013 10:14 am
by Pigauchiu
Old Man River wrote:I added extra AA guns to carriers in coral once and it worked but I dont know if they would move with carriers as they are set in possition, to get it to work i replaced the unused landing craft spawner in complex template with AA gun, and off set them to correct position on carrier. Maybe their is something else that is on original vehicle that can be replaced by AA gun in complex so it locks on ?
I added a shokaku then followed your method but the flaks still dont move with shokaku.

Re: possibility of making a flak carrier

Posted: Sat Jan 19, 2013 6:37 pm
by Swaffy
It seems as if you're spawning the AA guns on the map. As in adding the ObjectSpawner to the map. What you need to do is add the ObjectSpawner to the vehicle, that way it will get attached to the vehicle. Try to set Active the ShokakuComplex and add the AA gun there.

Re: possibility of making a flak carrier

Posted: Sat Jan 19, 2013 10:48 pm
by freddy
I dont think the aaguns has ObjectTemplate.hasMobilePhysics 1

The carriers has some special aaguns that might work

Re: possibility of making a flak carrier

Posted: Sun Jan 20, 2013 2:34 am
by Swaffy
F00k is on the right track. Look at the "Carrier_AA_Base" and see the layout of its code.
Objects/Vehicles/Sea/Carrier_AA_Base/