possibility of making a flak carrier

Ask questions, discuss ideas, get answers
Pigauchiu
Posts: 31
Joined: Fri Mar 30, 2012 1:00 pm

possibility of making a flak carrier

Post 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. :|
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: possibility of making a flak carrier

Post by Swaffy »

Last edited by Swaffy on Tue Jan 15, 2013 6:21 am, edited 1 time in total.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
Vilespring
Posts: 740
Joined: Sat Nov 24, 2012 5:47 am
Location: Somewere in the United States

Re: possibility of making a flak carrier

Post 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?
A picture is worth a thousand words, but takes up three thousand times the memory.

Area 51: http://battlefieldarea51mod.weebly.com/

Image
"I didn't steal your pizza"
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: possibility of making a flak carrier

Post 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.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Pigauchiu
Posts: 31
Joined: Fri Mar 30, 2012 1:00 pm

Re: possibility of making a flak carrier

Post 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
Old Man River
Posts: 77
Joined: Mon Jul 30, 2012 5:12 am

Re: possibility of making a flak carrier

Post 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 ?
Pigauchiu
Posts: 31
Joined: Fri Mar 30, 2012 1:00 pm

Re: possibility of making a flak carrier

Post 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.
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: possibility of making a flak carrier

Post 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.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: possibility of making a flak carrier

Post by freddy »

I dont think the aaguns has ObjectTemplate.hasMobilePhysics 1

The carriers has some special aaguns that might work
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: possibility of making a flak carrier

Post 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/
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Post Reply