Canalien 0 Posted June 22, 2006 Hi there, Is there a way to lock onto flying air targets only, and prevent the weapon from locking ground targets as well? i tried airLock = true; irLock = false; but irLock seems to override airLock and when false prevents ANY locking. Share this post Link to post Share on other sites
.kju 3245 Posted June 22, 2006 AFAIK there is no way. you could make (all) grounds units not lockable at all ... but thats not really an option i guess  Share this post Link to post Share on other sites
Canalien 0 Posted June 22, 2006 Might have to settle for second best... Is there a way to prevent AI from attacking ground vehicles, ie they only target aircraft? Share this post Link to post Share on other sites
.kju 3245 Posted June 22, 2006 well if its only for AI, this should be possible by altering the threat values. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">threat[]={0.700000,0.500000,0.300000}; Inf, Vehicles, Air 1 = ATTACK this unit 0 = "ignore" this unit yet you better double check this. its been a long time since i was into this. note that this works the other way round - these values are to be set in the attacked unit and not in the attacking unit ! Share this post Link to post Share on other sites
Canalien 0 Posted June 22, 2006 so there's no way to have 'Unit X' ignore ALL ground vehicles, but 'Unit Y' attack them as normal... suppose I should point out what I'm trying to do is have an AI manned SAM launcher, but it keeps attacking tanks. i only want it to attack air units. Share this post Link to post Share on other sites
.kju 3245 Posted June 22, 2006 maybe the cost value could help you here. it tells the AI when its worthy to attack a vehicle and i think cost is based on the attackers weapon and not the attacked unit (cant check right now). Share this post Link to post Share on other sites