CMD.ATTACK_MANUAL

CMD.ATTACK_MANUAL

Requests for features in the spring code.

Moderator: Moderators

Post Reply
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

CMD.ATTACK_MANUAL

Post by Argh »

Acts like standard Attack, but tells the engine to not bother with Avoid checks.

Right now, if you send a CMD.ATTACK with three params, if it raytests and finds a collision with something that's supposed to be Avoided, it cancels that attack command (which it should not do, imo, a three-param attack should ignore the raytest and just obey LOS / terrain), and instead the Unit behaves stupidly, and tries to move ever-closer to the "target".

Not exactly ideal behavior, when dealing with World Builder stuff. It makes it impossible to have Units that Avoid Neutral by default, yet can be told to attack Neutral stuff, if given an explicit order by a user.

Another way of doing this would be to just have a Lua callout that would cancel the Avoid status of the given WeaponID until reset. Then I could code timer loops in COB to handle it, among other possible approaches.

As it is, I'll just continue to not use the Avoid code.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: CMD.ATTACK_MANUAL

Post by imbaczek »

we could move avoid* (and much more, i guess) from the weapondef to the weapon itself and add proper manipulation functions. unitdefs could use the same treatment.
Post Reply

Return to “Feature Requests”