Page 1 of 1
Resetting KIAs counter - How?
Posted: Mon Nov 26, 2012 1:24 pm
by GottaLove88s
Does anybody know how to zero the killed in action (KIA) counters?
They list all of the killed units on the KIA summary screen.
I want to kill a few units at the beginning of a battle, to create some extra eye candy for a map.
(Excellent method courtesy of Amaris, merci monsieur, hère ->
viewtopic.php?f=105&t=39046)
I suspect that BA will "count" these in its KIAs. Is there any way to zero that counter?
It would only happen once, in PreBattleSetup, right at the start...
Thanks guys!

Re: Resetting KIAs counter - How?
Posted: Mon Nov 26, 2012 3:47 pm
by Amaris
I'm afraid that 's impossible.
In any case I do not see how.
By cons it seems that Pip had spoken to add a function to revive units. With this function, it will be possible at the end of the game, to revive the destroyed units at the beginning of the game so they will not be counted.

Re: Resetting KIAs counter - How?
Posted: Mon Nov 26, 2012 3:58 pm
by GottaLove88s
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!

Re: Resetting KIAs counter - How?
Posted: Mon Nov 26, 2012 4:30 pm
by Amaris
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.

Re: Resetting KIAs counter - How?
Posted: Mon Nov 26, 2012 4:31 pm
by pipfromslitherine
There isn't a way to tinker with the kills, no. It's something which has come up before. I have adding an ability in the editor to place dead versions of units on my wishlist, but it's more fiddly than it first appeared, so not sure if it will make it onto the actual todo list
Might be simpler to add a new command to mark a unit as not counting for kills.
P.S. You can't revive units which are all dead, or single units, IIRC.
Cheers
Pip
Re: Resetting KIAs counter - How?
Posted: Mon Nov 26, 2012 4:43 pm
by GottaLove88s
pipfromslitherine wrote:Might be simpler to add a new command to mark a unit as not counting for kills.
Pip
Thanks Pip!
That would work. Using that method, we could...
1. Add the "to be destroyed" unit on the map, using the Editor as normal
2. Mark it "does not count towards kills" in a PreBattleSetup script (or via the Editor, if you're feeling generous?

)
3. Then destroy it using Amaris' PreBattleSetup script
Voila, we have one dead unit, that will interract with map traffic, and no KIA count.
How can I do that?

Re: Resetting KIAs counter - How?
Posted: Mon Nov 26, 2012 5:23 pm
by pipfromslitherine
It's not possible until the next update, but I will add it to the list.
Cheers
Pip
Re: Resetting KIAs counter - How?
Posted: Mon Nov 26, 2012 5:29 pm
by GottaLove88s
Thanks Pip, I promise to wait... with my usual patience...
