Yup... I'm dragging this old chestnut out again... maybe somebody can find the time to code it, because I'm tired of hacky, not-working-very-well workarounds for this.
minimumRange works like this: if distance atan (XYZ) < minimumRange, then weapon fails. Expressed in Spring units (aka "elmos"), therefore 8 units = 1 square. Should be applied during the target-acquisition phase- if target failed, then new target is chosen.
TDF Request: minimumRange
Moderator: Moderators
There's a hacky script workaround, if you're pressed for something in the meantime Argh. Just add a weapon with a range equal to the minimum distance the unit can shoot at, and lock the main weapon while that short range clone is active. You'd have to find some way to keep it from trying to move to get both weapons in range though...
I actually have written a pretty elegant lockout that works pretty well, but it's not really the issue. If minimum-range worked properly, we could have "rings" of damage based on range with less computation than Rattle's fix, which feels too clunky for me tbh, and we could also build field-effect weapons, among other things.
Argh wrote: If minimum-range worked properly, we could have "rings" of damage based on range with less computation than Rattle's fix, which feels too clunky for me tbh, and we could also build field-effect weapons, among other things.
You can already do all of this. Its how armor combat works in '44. Funnily enough, we were recently discussing switching off the 'different weapons represent the same gun at various ranges' deal to rattle's patch, should it prove reasonably accurate, just because of how much more clear of a solution it is for the player and the immensely smaller headache for us.
Well, sorry AF, but I'm designing my mod for humans, playing against other humans. If it happens to work with an AI too, great, but they're not really priority number one. No offense; a lot of the AI work is awesome, but I'm not going to sacrifice potential features to maintain AI compatibility. That means using whatever resources I can, "non-standard" scripting and mod controlled LUA included.