Reviewed by Maker, Terrain Kill System v1.2, 14th Jan 2013
The system seems to work quite well. It could check into 8 directions for more accuracy, but that would make the script heavier.
You could add a configurable variable for that.
Reviewed by Maker, Terrain Kill System v1.0, 9th Jan 2013
I strongly recommend using a hashtable for the system as the number of loops
you do with an array solution increases rapidly when more deadly terrain
types are added. You can leave as it is but it will cost you in rating.
You leak loc1.
The looping trigger should be turned off when the group is empty. You could trigger it
or explain it somewhere.
If your system requires there to be deadly terrain on all sides for the unit to die, then it is enough if there is a safe terrain on one side.
Use that thought to optimize the loop.
Reviewed by Maker, Terrain Kill System v1.0, 29th Dec 2012
Add support for multiple deadly terrain types.
A hashtable will prove to be useful there, save a boolean using the
terrain type as a parent key. Check if the boolean exists or not in
the looping trigger.
The logic in the looping trigger can be improved.
The looping trigger doesn't need to update that often.
You don't need to use an array for the locations.