GottaLove88s wrote:Hmmm, that's intriguing...
What if the destroyed unit was armour, say a Sherman, and during the game the wreck of that destroyed Sherman was "cleared" by another unit. Can I still revive it? Even tho there is no evidence that it was ever there?
Just checking, but overall, I love the idea of being able to destroy units before the game, to create wrecks for the map, and reviving them at the end, so that they don't affect the KIAs... I guess this explains your question on "PostBattle"? I wonder, if there's a way to do this at say, "Turns Remaining 2"?
Merci encore Monsieur!

No idea : this function doesn't exist now...
Must memorize every unit destroyed, like this:
Code: Select all
FUNCTION PreBattleSetup()
{
...
int id;
int countid;
id = GetUnitOnTile(TILEX, TILEY); //Remplace Tilex and Tiley by the coordinates of the tile.
countid = -1;
if (id != -1)
{
DestroyUnit(id, 255) ;
countid++;
SetArray(countid, id, 1);
}
SetGlobal ("MaxUnitDestroyed", countid) ;
...
To recover them at the end of the battle:
Code: Select all
FUNCTION VictoryConditions()
{
...
int id;
int countid;
for (countid = 0 ; countid < MaxUnitDestroyed + 1 ; countid++)
{
REVIVEUNIT(GetArray(countid, 1));
}
...
EndBattle(0);
...
}
That it lacks the function REVIVEUNIT.
We have already a ReviveUnit(id, mask) FUNCTION but: //resurrect the denoted men in a unit. This will remove any dead bodies, will appear in place on the unit tile.
WILL NOT work on dead units.
My question about the script end tower has nothing to do with it.

I try extreme changes.
