Posted: Mon Oct 10, 2016 7:19 pm Post subject:
Weird problem or unit not voluntarily targeting?
So I added my technical (truck mounted AA-only gun), voices, sfx, voxel, FLH, all good...
Now what happens is the unit will happily target aircraft but doesn't seem to want to bother with paratroopers, or at least it loses interest in them, it's hard to describe. If I select the unit and attack the paratrooper it will happily fire though, and may continue attacking another 1-2 after as it gets excited. Thing is where the paratroopers are well within range and just falling, and I have flak troopers right next to the technical, the trooper will fire, the technical will not.
I've played around with giving it DefaultToGuardArea but that makes them chase aircraft, even then it behaved the same way towards paratroopers.
Below is the current code, if anyone has ideas...
Code:
[TECHTRK]
UIName=Name:TECHTRK
Name=Technical AA-truck
Prerequisite=NAWEAP
Primary=TechnicalCannon
ElitePrimary=TechnicalCannonE
Strength=180
Category=AFV
Armor=medium
Turret=yes
IsTilter=yes
TooBigToFitUnderBridge=false
TechLevel=5
Sight=8
Speed=8
ROT=8
CanPassiveAquire=yes
CanRetaliate=yes
OpportunityFire=true
CrateGoodie=yes
Crusher=no
Owner=Confederation
RequiredHouses=Confederation
AllowedToStartInMultiplayer=no
Cost=380
Points=5
IsSelectableCombatant=yes
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
VoiceSelect=TechnicalSelect
VoiceMove=TechnicalMove
VoiceAttack=TechnicalAttackVoice
VoiceFeedback=
DieSound=GenVehicleDie
MoveSound=LightTankMoveStart
Maxdebris=2
SpeedType=Wheel
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1}
MovementZone=Destroyer
ThreatPosed=10 ; This value MUST be 0 for all building addons
DamageParticleSystems=SparkSys,SmallGreySSys
DamageSmokeOffset=100,80,275
Weight=3.5
VeteranAbilities=STRONGER,FIREPOWER,SIGHT,FASTER
EliteAbilities=SELF_HEAL,STRONGER,FIREPOWER,ROF
ZFudgeColumn=8
ZFudgeTunnel=13
Size=3
Accelerates=true
[TechnicalCannon] ; used by TECHTRK
Damage=20
ROF=35
Range=10
Projectile=TechnicalP
Speed=200
Report=TechnicalAttack
Warhead=TechFlakWH
Anim=GUNFIRE
Degenerates=true
[TechnicalP] ; normal inaccurate AA bullets
Image=none
Inviso=yes
AA=yes
AG=no
AN=no
Shadow=no
Inaccurate=yes ; Bullets do not snap onto targets when "close enough".
Ranged=yes
SubjectToCliffs=no
SubjectToElevation=yes
SubjectToWalls=no
PS. I recently added Bullets=yes and Ranged=yes but they don't seem to have any impact on the issue, just let's you see bullet flames around the target.
I'm not that experienced with RA2 modding, but i would assume it's because even paratroopers are internally seen as ground units.
Since your unit has AA=yes only weaponry, it doesn't auto-targets these flying ground units.
If i'm not mistaken do all AA units in RA2, that successfully target paratroopers, also have an AG weapon.
I would try to give the unit a dummy ground weapon. One with Damage=0, same Range as the AA weapon and a dummy Warhead with all infantry armor Verses=2% so it auto-targets them.
Since your AA weapon has higher Verses values as your AG weapon, your AA one is always used for airborne targets.
Though the dummy AG weapon could cause trouble when the unit is firing happily on ground infantry without being able to do any damage to them, while at the same time ignoring real flying threats above it. _________________ SHP Artist of Twisted Insurrection: Nod buildings
Yes, that works. It's the same way you get Patriot Missiles and Flak Cannons to fire at Paratroopers. AG=yes on a projectile with LandTargeting=1 (can't fire on land), allows a weapon to fire at "ground units" (paratroopers are considered ground, as LKO stated) so long as they are in the air. _________________ Tiberium Uprising (a few missions for TS): http://www.ppmsite.com/forum/viewtopic.php?t=31029 QUICK_EDIT
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum