BATTLEZONE COMMUNITY FORUMS
http://bz2maps.us/phpBB/

How can I add a fixed turret via hp_tap?
http://bz2maps.us/phpBB/viewtopic.php?f=10&t=5076
Page 1 of 1

Author:  Edgrr [ October 21st, 2016, 3:57 am ]
Post subject:  How can I add a fixed turret via hp_tap?

I have an air factory where I added hp_tap_1 & 2 and I would like to be able to add a costumized fixed gun type turret to each corner of the factory itself. How is this done? The factory is based of the ISDF model. Do I need to use the Scion version to add a tap for the turret? Thx, Edgrr. :-??

Author:  General BlackDragon [ October 21st, 2016, 5:11 pm ]
Post subject:  Re: How can I add a fixed turret via hp_tap?

Add HPs to your model.


Taps go under [PoweredBuildingClass] for everything except classlabel = "turret", which goes under [TurretCraftClass].

[PoweredBuildingClass]
powerTap# = "HP_WHATEVER"
powerName# = "tapODFname"



Code:
[PoweredBuildingClass]
powerTap3 .. powerTap8 = "" // powerTap 1, 2 already existed. Adding a few more
powerName1 .. powerName8 = "" // 'powerName' already existed. Adding ability to make all 8 distinct

   In short, I upped the # of taps from 2 to 8, and allowed them to be
distinct.  For powerName1..8, they default to whatever powerName is
set to, so you can easily make them all identical. Also made their
powercost set from the ODF they derive from, and if the tap object's
powercost is 0, then the building shouldn't go unpowered if it's
destroyed.  For replacing taps via rig/AIP, then only the item
specified in powerName/powerName1 will be used. It'd be a bit more
work to make upgrades go to the right one of several destroyed
ones. Compiles, but is untested. [NM]

Author:  Edgrr [ October 22nd, 2016, 3:10 am ]
Post subject:  Re: How can I add a fixed turret via hp_tap?

General BlackDragon wrote:
Add HPs to your model.


Taps go under [PoweredBuildingClass] for everything except classlabel = "turret", which goes under [TurretCraftClass].

[PoweredBuildingClass]
powerTap# = "HP_WHATEVER"
powerName# = "tapODFname"



Code:
[PoweredBuildingClass]
powerTap3 .. powerTap8 = "" // powerTap 1, 2 already existed. Adding a few more
powerName1 .. powerName8 = "" // 'powerName' already existed. Adding ability to make all 8 distinct

   In short, I upped the # of taps from 2 to 8, and allowed them to be
distinct.  For powerName1..8, they default to whatever powerName is
set to, so you can easily make them all identical. Also made their
powercost set from the ODF they derive from, and if the tap object's
powercost is 0, then the building shouldn't go unpowered if it's
destroyed.  For replacing taps via rig/AIP, then only the item
specified in powerName/powerName1 will be used. It'd be a bit more
work to make upgrades go to the right one of several destroyed
ones. Compiles, but is untested. [NM]


So I have added hp_tap_1 & 2 and modified the factory odf to add what you posted but the turret can only be built outside of the factory on open ground and the turret itself does not function; it an ISDF turret model. Does the gun turret need to be based off of a gun tower odf? Thx, Edgrr. :ymdaydream:

Update: Okay so I changed
powerTap# = "HP_WHATEVER" to powerTap1
powerName# = "tapODFname" to powerName

I used the ISDF gun tower as a test and it spawned on my factory and works, but it builds up the terrain around the factory itself. I'm guessing I need to design a smaller customized unit/model scaled to the factory minus the terrain__h part. Thx I'll post progress on the taps guns as I need to build the new gun turret in the same scene file to use the factory as a reference to scale the tap guns for my air factory model.

Thx, for the info GBD. FYI, I read on another forum (Mates, I think) about your comments when Clavin12 was working on his FAE mod about adding taps to existing units.

Finally got it done here's a pic of the air factory complete with the dual gun turrets.
Image

Author:  General BlackDragon [ October 22nd, 2016, 5:29 pm ]
Post subject:  Re: How can I add a fixed turret via hp_tap?

Not bad.

Typically, taps need ownsTerrain = false in thier ODFs, so that they don't interfere with their hosts' collision/terrain ownage.

However, i have once made a building that had tap hps far away from it that did own terrain, so this only applies if the tap is within the terrain square of the host building (which is common)

Typically, since taps do not own terrain, they use canCollide = true to make them collidable.

Author:  Edgrr [ October 23rd, 2016, 1:24 am ]
Post subject:  Re: How can I add a fixed turret via hp_tap?

One question I have about using a custom IDSF constructor is why it can demolish a tap turret but can't replace it on the tap itself again. It can build it on open terrain but not the tap itself? The Scion con can but can the ISDF version be made to do the same thing? Thx, Edgrr. :ymdaydream:

Author:  General BlackDragon [ October 23rd, 2016, 11:44 am ]
Post subject:  Re: How can I add a fixed turret via hp_tap?

[BuildClass]
CanDemolish = false

will turn off the ability to demolish the tap...


Any constructor can "Add Lung" if any building on their team has a Tap.

Author:  Edgrr [ October 25th, 2016, 1:17 am ]
Post subject:  Re: How can I add a fixed turret via hp_tap?

General BlackDragon wrote:
[BuildClass]
CanDemolish = false

will turn off the ability to demolish the tap...


Any constructor can "Add Lung" if any building on their team has a Tap.


Hmm, why can't it replace a my gun turret tap? Is it because it's not a lung? Can lung be changed (hacked) to another tap like my gun turret? Thx, Edgrr. :ymdaydream:

Author:  Ded10c [ October 25th, 2016, 2:05 am ]
Post subject:  Re: How can I add a fixed turret via hp_tap?

"Add Lung" should replace a destroyed or demolished tap on the selected building.

Author:  General BlackDragon [ October 25th, 2016, 8:56 am ]
Post subject:  Re: How can I add a fixed turret via hp_tap?

The option "Add Lung" should be on your constructor any time your air factory is on your team.

It should allow you to replace a destroyed GT on the air factory?


if not, post odfs here under a [code] tag?

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/