This is probably one for the intelligentsia of Enric, rf900 or Richcat... but does anyone know how to create a minefield for BA? Does this code exist anywhere?
As an approach, I was thinking about this...
1. Create a new unit called Minefield (graphic of a skull & crossbones, no movement, zero firing range, zero AP, zero HE)
2. Add some code that allows engineers to place Minefield units in adjacent squares, or to remove them
3. Add something (to squads.csv? or to terrain.txt? or somewhere else, i'm not sure?) that let's Minefield units hide in any terrain (in the same way that infantry can hide in trees, houses, etc)
4. Enemy scouts would be able to see minefields by piggybacking on the existing BA code (in the same way that scouts can see other hidden units, if they're close enough) but minefields would be invisible to all other enemy units
So now you've got a Minefield icon, that engineers can place/remove, and scouts can see from 2 spaces away. It can't move or fire.
5. Give Minefield units a 1-space HE and AP reaction shot in squads.csv
That would mean, when any enemy unit entered into a square adjacent to the Minefield, it would "defend" itself. The strength and accuracy of a minefield's explosion could be set by the HE min/max and AP min/max, to have different impacts on infantry (low; ie. set to kill 1-2 men) or armour (high; ie. set to knock out a tank).
6. After the Minefield fires its reaction shot, it should automatically "die"
This would mean minefields effectively guard 3x3 areas, so they are mine fields rather than single mines, because I couldn't figure out an easy way to make it work as a single square.
There are problems with this approach, in that by using existing BA code, minefields would always be marked as visible for the home team and would only attack enemy units. Also, enemy engineers would have to suffer one HE attack if they moved into an adjacent square in order to remove a minefield (unless anyone knows how to make the engineer unit type immune to reaction shots from minefields?).
Might this work? Does anyone know how to...?
Thanks for all ideas and suggestions...



[/quote]