Originally Posted by: Annihilationzh Not directly. It will stay in the air as long as it has any ammo of any kind. Planes are very limited in what you can do with their weapons without getting issues like this. Even bike logic doesn't work on them.
I got it to "work" by removing the "return to base" behavior from the machine gun; now the jets will return by themselves after firing the missiles, even if they didn't fire the machine gun at all. I'll just put a big reload time on it (big enough that it won't have reloaded before returning to base) so that it effectively can only have 1 clip fired per sortie.
Quote:See the comanche. They'll only use their primary weapon by default. You have to tell them when to use others. I'm actually surprised the red guard works.
I... don't quite get it. Don't most units use all their weapons? What's special about the Comanche/Minigunner/Redguard?
I added these lines to the Minigunner's AI and it works now:
Quote: ; this is a bit of a trick... normally, units cannot move-and-fire at
; the same time. we need the comanche to be able to. so we give it
; a "turret" (invisible) and put the two main weapons on it, but with
; no turn rate. voila!
Turret
TurretTurnRate = 0 ; this "turret" does not turn
TurretPitchRate = 0 ; nor does it pitch
ControlledWeaponSlots = TERTIARY
End
Redguards still work out of the box, somehow. I tested it both with the player and an AI faction controlling the Redguards.
Also, I added a service rifle to the Supply Truck (those dudes work in the frontline!) and the Dozer... I don't know why, but somehow it killed the Supply Truck's KatyushaWeapon that I added earlier. I can still make it fire with ctrl + left click for attack ground, but the units will not fire the weapon:
1. if I target an actual enemy (both through clicking and through control clicking);
2. by themselves, ever
Also, unlike the Dozer (who just sits there and attacks with what's basically an infantry rifle just like an infantry unit would), it will shoot 1 shot of its rifle (it has a clip of 3) and immediately turn away. So even that part of the weapon does not work.
I have added the "CAN_ATTACK" kindof to it, doesn't change anything (also, the KatyushaWeapon worked fine before without this).
Is this related to what you said about the Comanche? Why (tanks work fine when I give them 3 weapons)? How do I fix this? They already have a turret behavior in their AI.
EDIT: I think this part may partly be due to attack range... the rocket barrage has a minimum range of 100, and the rifle has a maximum range of 100. If I just disable the rifle weapon, the rocket barrage works fine. Does this also mean I can't add a small caliber secondary weapon to artillery pieces for self defense?
Edited by user Tuesday, January 19, 2021 12:11:34 AM(UTC)
| Reason: Not specified