How would I pull off a variable that counts kills

I'm wondering how I can make it so when you defeat an enemy, a certain variable increases

Is there a script for that? or some method of have an event count it?
In the troop battle event page, set the condition to check for when an enemy hp is at zero and then set in up so it increases the variable (make sure it is set to battle for the span so it does not keep adding to the variable like crazy).

You are going to have to do this for every enemy in the battle with a different page corresponding with each enemy.

I believe this should work (unless the battle system prevents the event from firing by leaving the scene right after the last enemy is defeated).

So try this out.
*Edit*

Oops! Just saw the other reply by AwesomeCool. Here's a screenshot anyways. 🙂

AanC3vK.png
(unless the battle system prevents the event from firing by leaving the scene right after the last enemy is defeated).
That is the reason why it won't work for the last enemy in a troop.
To prevent that leaving and have it count correctly, you either have to make an event on turn 0 that give all enemies an immortal state and additional events that remove the state after the death at HP=0 is counted, or you'll have to use a script that gives additional after battle triggers for events.


Such a script is available from Tsukihime for example
That is the reason why it won't work for the last enemy in a troop.

To prevent that leaving and have it count correctly, you either have to make an event on turn 0 that give all enemies an immortal state and additional events that remove the state after the death at HP=0 is counted, or you'll have to use a script that gives additional after battle triggers for events.

Such a script is available from Tsukihime for example
Link?
I doubt that Andar has a link, he just knows abiut it.

Search for Himeworks on google, that will take you to Tsukihime's own web site. You get it from there. Make sure you look in his site for scripts (Ace) not plugins (MV). Several have similar names.
If enemy HP turns zero then

variable killcount +1

well, I used that for counting xD

use them at every battle scenes <_>b

Original thread: https://forums.rpgmakerweb.com/threads/how-would-i-pull-off-a-variable-that-counts-kills.53480/