←  C&C 3: Tiberium Wars Editing

Fallout Studios Forums

»

Minigun Black Hawk Transport issues

Madin's Photo Madin 11 Feb 2010

I'd like to include a Black Hawk similar to the one seen in the Tiberian Dawn FMV http://www.cnc-source.com/forums/index.php...ge&img=6734

The Primary weapon will be the minigun & any troops that are being transported inside it will also ba able to fire from it:
1. Is it possible to have the helicopter appear like the Orca does when built, but once it takes off from the airfield, it no longer reserves a space? (preferred). Or have the helicopter appear from above like the Hammer head does in Kane's Wrath?
2. Has the main weapon will be firing from the side, I'd like the helicopter to attack targets with the minigun side-on (The Orca attacks head-on). How would I go about coding this?
3. The helicopter has to be able to land to pick up and drop off troops, is this possible on the Orca locomotor?
4.Would there be any issues with there being garrisoned weapons & the main (minigun) weapon conflicting? For example the garrisoned weapon being used instead of the minigun? (I'm mainly thinking about the side-on attack that the main weapon uses vs the all around attack of garrisoned weapons).
Thanks!
Quote

Slye_Fox's Photo Slye_Fox 11 Feb 2010

1. Yes. In the JetAI, you can set it to save (or not) a parking space.
2. No idea.
3. This is controlled by something else (don;t know what), locomotors just control how it moves.
4. The infantry inside are separate units so do not interact with the carrier's weapons.


Note; Use GArrisonCaontain for this to get units to fire out, theres a mobile garrison line in it so don;t worry.
Quote

Madin's Photo Madin 11 Feb 2010

Thanks for your answers!
Quote

JJ's Photo JJ 12 Feb 2010

You can try making the sidedoor weapons work with the same logic on the Annihilator Tripod turrets. Just reference them and you should be heading somewhere.
Quote

Madin's Photo Madin 13 Feb 2010

View PostJJ, on 12 Feb 2010, 8:42, said:

You can try making the sidedoor weapons work with the same logic on the Annihilator Tripod turrets. Just reference them and you should be heading somewhere.

Good point, the Tripod's rear turret.
Quote

Madin's Photo Madin 23 Feb 2010

View PostJJ, on 12 Feb 2010, 8:42, said:

You can try making the sidedoor weapons work with the same logic on the Annihilator Tripod turrets. Just reference them and you should be heading somewhere.

Helicopter still insist on attacking facing forwards.
Quote

Destiny's Photo Destiny 23 Feb 2010

You can't help it, units with turrets will turn to face their targets no matter what because of coding and in logic, present the most armored side of them to the enemy.


Edit: When you tell them to fire on their targets. When left alone...that I'm not sure.
Edited by Destiny, 23 February 2010 - 05:46.
Quote

JJ's Photo JJ 23 Feb 2010

But do the side door turrets work properly? As long as they do, I think it's a fair enough bug. Maybe it's the whole turn to the target logic C&C3 has, but I don't think so. Knowing SAGE, it probably won't turn automatically to the target so that one of it's miniguns can fire, though.

You can try making the whole chassis the turret, but it looks odd when it flies sideways.
Quote

Madin's Photo Madin 23 Feb 2010

View PostJJ, on 23 Feb 2010, 9:24, said:

But do the side door turrets work properly? As long as they do, I think it's a fair enough bug. Maybe it's the whole turn to the target logic C&C3 has, but I don't think so. Knowing SAGE, it probably won't turn automatically to the target so that one of it's miniguns can fire, though.

You can try making the whole chassis the turret, but it looks odd when it flies sideways.

Yes the side door turrets work, but the helicopter will always turn to face a target, rendering it useless.
Quote

JJ's Photo JJ 24 Feb 2010

Is it the turn to face target logic that vehicle has? Try disabling that, though I'm not sure how.
Quote

Destiny's Photo Destiny 24 Feb 2010

I recall the Devvie doesn't turn to face it's target if shooting at people if you don't order it to...
Quote

Madin's Photo Madin 24 Feb 2010

View PostJJ, on 24 Feb 2010, 9:35, said:

Is it the turn to face target logic that vehicle has? Try disabling that, though I'm not sure how.

I would not know where to find such code, do you know?
Quote

Golan's Photo Golan 25 Feb 2010

It's in the AI update. You might have to check the schema files for it though as it's usually omitted.
Quote

Madin's Photo Madin 25 Feb 2010

View PostGolan, on 25 Feb 2010, 9:34, said:

It's in the AI update. You might have to check the schema files for it though as it's usually omitted.

Cannot see much in there (Schema) that would help me!
I'm guessing that there is no 'normal' way to get this to work.
Quote

JJ's Photo JJ 26 Feb 2010

I think the parameter is RotateToTargetWhenAiming. It is in Modules\UnitAITargetChooser.xsd file. I've seen it in the APC code, but doesn't seem to work. Maybe changing the default parameter to false in the schema will help.
Quote

Madin's Photo Madin 27 Feb 2010

View PostJJ, on 26 Feb 2010, 10:14, said:

I think the parameter is RotateToTargetWhenAiming. It is in Modules\UnitAITargetChooser.xsd file. I've seen it in the APC code, but doesn't seem to work. Maybe changing the default parameter to false in the schema will help.

Thanks for the information, unfortunately it did not work.
Quote

Slye_Fox's Photo Slye_Fox 27 Feb 2010

The rotate thing if just when the unit automaticly attacks.
The unit turning when commanded is hard coded.

Try making the chassis a turret.
Quote

Madin's Photo Madin 27 Feb 2010

View PostSlye_Fox, on 27 Feb 2010, 11:33, said:

The rotate thing if just when the unit automaticly attacks.
The unit turning when commanded is hard coded.

Try making the chassis a turret.

But what about the post below?

View PostJJ, on 23 Feb 2010, 9:24, said:

You can try making the whole chassis the turret, but it looks odd when it flies sideways.
Quote

JJ's Photo JJ 27 Feb 2010

It's doable, it just will fly sideways sometimes.
Quote

Slye_Fox's Photo Slye_Fox 27 Feb 2010

Easy fix, make it not able to fire when moving.
Also, remove idle scan and give it a vary short reload time.
Quote

Madin's Photo Madin 27 Feb 2010

The problem now is that the 'Turret' has to fire from it's side, how do I get the turret (helicopter) to turn to the correct side to attack?
Quote

Slye_Fox's Photo Slye_Fox 28 Feb 2010

change the axis in 3ds
Quote

Madin's Photo Madin 28 Feb 2010

View PostSlye_Fox, on 28 Feb 2010, 1:09, said:

change the axis in 3ds

This makes no difference.
Any other ideas?
Quote

Golan's Photo Golan 28 Feb 2010

View PostMadin, on 27 Feb 2010, 21:31, said:

The problem now is that the 'Turret' has to fire from it's side, how do I get the turret (helicopter) to turn to the correct side to attack?

You can set it to see it's natural position as already turned by a certain angle. This way, whenever the turret (in this case, the whole helicopter) aims somewhere, it will first rotate sideways to compensate this offset.
Codewise, use NaturalTurretAngle in the TurretSettings of a WeaponSlotTurret. See the GDIBattleship as an example if you need one.
Quote

Madin's Photo Madin 28 Feb 2010

View PostGolan, on 28 Feb 2010, 14:01, said:

View PostMadin, on 27 Feb 2010, 21:31, said:

The problem now is that the 'Turret' has to fire from it's side, how do I get the turret (helicopter) to turn to the correct side to attack?

You can set it to see it's natural position as already turned by a certain angle. This way, whenever the turret (in this case, the whole helicopter) aims somewhere, it will first rotate sideways to compensate this offset.
Codewise, use NaturalTurretAngle in the TurretSettings of a WeaponSlotTurret. See the GDIBattleship as an example if you need one.

<TurretSettings TurretTurnRate="200" RecenterWhenOutOfTurnRange="false" NaturalTurretAngle="-90d" AllowsPitch="false">
            <!--MaxDeflectionClockwise="45d"-->
            <!--MaxDeflectionAntiClockwise="45d"-->
            <TurretAITargetChooserData CanAcquireDynamicIfAssignedOutOfRange="false">
              <!--RotateToTargetWhenAiming="true"-->
            </TurretAITargetChooserData>
          </TurretSettings>

The problem here is that the Helicopter always faces the angle inputted into the 'NaturalTurretAngle' attribute, even when on the airfield!
Quote