Page 1 of 1
TDF Request: minimumRange
Posted: 27 Mar 2007, 05:44
by Argh
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.
Posted: 28 Mar 2007, 09:04
by MadRat
How should this affect the unit behavior when the target is inside weapon1 range?
Posted: 28 Mar 2007, 12:07
by KDR_11k
Run away.
Posted: 28 Mar 2007, 19:24
by Nemo
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...
Posted: 29 Mar 2007, 00:02
by Argh
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.
Posted: 29 Mar 2007, 01:50
by Nemo
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.
Posted: 29 Mar 2007, 02:08
by AF
COB scripted solutions play havoc with skirmishAIs/GroupAIs/Lua Widgets. A value used internally or at least accessible by AIs/widgets is much much better aswell as relieving a possible lag with more complicated and nonstandardized COB scripting practices.
Posted: 29 Mar 2007, 02:22
by Nemo
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.
Posted: 29 Mar 2007, 07:33
by KDR_11k
Argh wrote: If minimum-range worked properly, we could have "rings" of damage based on range with less computation than Rattle's fix
Which do you think takes less computation: One exponential function on impact or searching for units in range for multiple weapons?