Page 1 of 1

Unit weapon range buffer question.

Posted: 17 Dec 2011, 19:29
by smoth
Ok so a unit when it goes to fire at a unit, the target must be within it's max range. this is normally ok but for some things this is an issue. Say a unit that has to setup to fire, because that is what I am about to do. Certain units like say the xamel have to use a setup animation before firing.

Image
So take the above picture.
step A: unit sees target goes just into his range(red) and begins aiming animation..
step B: target moves out of range edge. Unit has to move to fire at target.

What happens is a unit moving, stopping, moving stopping over and over again.

so is there a way to have C, a minimum range(represented by green) to unit before it starts aiming to fire at target?

Re: Unit weapon range buffer question.

Posted: 17 Dec 2011, 19:30
by smoth
The reason I am asking is I have artillery units which I want to have a 3 second setup animation before they can fire. but the problem is they want to start the animation as soon as A is reached.. which is not close enough..

Re: Unit weapon range buffer question.

Posted: 17 Dec 2011, 21:56
by knorke
dummy weapon and slaveTo?
or get targetID in WeightShot/Blockshot or what the lus callin is called and do some distance calc there.
so is there a way to have C, a minimum range(represented by green) to unit before it starts aiming to fire at target?
I think what you actually want is the unit to start aiming before the target is in range, so the gun will by ready once the enemy is near enough.