I feel ODHS_HealedUnit is a bit misleading because the heal doesn't actually have to happen. Perhaps ODHS_HealingUnit would be better.
What I'm most concerned about is the current method to find the registered unit type on ODHS Effect trigger. Looping through the array while it is short won't be a problem, but when there's a lot of them, let's say, 100, then it might become a hinderance. A hashtable is better for this purpose.
There's possible recursion that leads to overwritten variables in scenarios like this:
-
ODHS Riflemen Revive
-

Events
-


Game - ODHS_Event becomes Equal to 3.00
-

Conditions
-


(Unit-type of ODHS_DeadUnit) Equal to Rifleman
-

Actions
-


Set VariableSet TempLoc = (Position of ODHS_HealedUnit)
-


Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
-


Unit - Kill (Last created unit)
-


Unit - Create 1 (Unit-type of ODHS_HealedUnit) for (Owner of ODHS_HealedUnit) at TempLoc facing Default building facing degrees
-


Unit - Remove ODHS_HealedUnit from the game
-


Custom script: call RemoveLocation(udg_TempLoc)
ODHS_HealedUnit will be always a footman, unless, of course, the kill or any form of death from damage happens after all the actions that.
Dealing and solving recursion looks very troublesome and nasty, as the user has access to the system variables, and could create his own, and at same time using filters. I think giving a warning on how NOT to do recursion unless they know what they're doing should do it.
Aside from that, it's a pretty nice system, seems like it could also fit for some dark spells regarding necromancy or sacrifices.
Approved