Minimum attack range

Minimum attack range

Requests for features in the spring code.

Moderator: Moderators

Post Reply
User avatar
Agon
Posts: 527
Joined: 16 May 2007, 18:33

Minimum attack range

Post by Agon »

Would be good to have a minimum attack range.
Example:
Attacking unit would attack:
Attacking unit:----(Miin)-unit---(Max)
Would not attack:
Attacking unit:---unit (Min)------(Max)
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

Post by Peet »

There's a hacky way to do this with a slaved weapon and a few lines of script, but an engine feature (or a luarule) to do this would be nice too.
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

We don't need an example for something like this, we aren't retarded :wink:
User avatar
Agon
Posts: 527
Joined: 16 May 2007, 18:33

Post by Agon »

Snipawolf wrote:We don't need an example for something like this, we aren't retarded :wink:
I don´t know. Maybe.?
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Shouldn't be too difficult to add a minRange tag.

But as mentioned by Pete it's entirely possible with a slaved weapon. The slaved weapon will have the minimum range and actually will never fire.

As long as the AimWeapon function for the null weapon is being called you disable/lock up the real weapon's AimWeapon function and also start a timer-function in the background which will reenable the main weapon after some time - perhaps a bit longer than the interval at which spring aims. Should work like that... somehow.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Rattle, that'd lock the unit up when something gets too close, it won't make it pick another target.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Hmm right. Also the unit would always try to get into the minimum range making it rather useless...
Post Reply

Return to “Feature Requests”