Printable Version of Topic

Click here to view this topic in its original format

SWR Productions Forum _ Generals/Zerohour Modding _ Can we make a unit NOT to attack buildings when Guard ?

Posted by: ai_beyondcontrol 17 Feb 2019, 5:32

Long story short, I added an auto-cannon weapon to Raptor Jet,

CODE
……
  AntiGround                  = Yes
  AntiAirborneVehicle         = Yes
  AntiAirborneInfantry        = Yes
……


basically it works fine. But I want the auto-cannon attack building only when been manually ordered to do so by the player, not while been set to Guard or AutoAcquireEnemiesWhenIdle, but still attacks other living targets such as enemy infantry or vehicle unit. Is it possible ?

Previously I attempt to use
CODE
AutoChooseSources = SECONDARY  FROM_PLAYER

But this also prevents raptor using the auto-cannon on enemy units other than buildings;

Resetting auto-cannon's DamageType to Non-building-only ones such as RADIATION would prevent manual attack attempt;

PreferredAgainst logic seems not work because since the clip of auto-cannon is larger than raptor jet's original missile, when the jet's missile weapon is depleted it will again using auto-cannon to attack buildings when set to Guard.

So I wonder if there's a way to solve the problem, or it's just impossible?

Posted by: Zeke 17 Feb 2019, 6:54

Impossible

Posted by: ai_beyondcontrol 17 Feb 2019, 7:47

QUOTE (Zeke @ 17 Feb 2019, 13:54) *
Impossible


Thanks!

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)