Seen 1 Week Ago
Posted 1 Week Ago
7 posts
19 Days
I’m a bit new to RPG Maker Xp and Pokemon essentials, but I’ve been wanting to know if there’s a way for the game to detect if you use a certain move to defeat a pokemon in a battle.
For context, my idea is that I want to make a game that lets you “Kill” pokemon. But I don’t just want to make it so when it faints, it ‘dies.’ I still want the player to be able to choose to either faint the pokemon or kill it. So I thought by making it a specific move, (along with a special type) it’ll set a variable that sends the player down a different path. Making it a move seems the easiest way to do it, because I’m going to make it so you can only learn these moves from the evil team.
Context done, is there anywhere in the script that tracks what killed a pokemon in a specific battle? I know it tracks if it’s been caught or fainted (obviously) so is having it ‘killed’ an option? If there isn’t, is there an easy way to make a script to do it? Or maybe a workaround that achieves a similar affect? (With the player being able to choose to go down ‘Evil’ route during a battle)

Amras Anárion

Age 32
Male
Kalos
Seen 10 Hours Ago
Posted 3 Days Ago
30 posts
2.4 Years
The simple way would be to have a tag (or a counter) activated (or incremented) every time your specific attack hits the goal.
Use a game variable for a counter and a game switch for a tag.
You just have to think about putting conditions downstream so that the consequences can be expressed at the right time (loss of "karma", multiplication of experience gains, different reaction of the trainer during or after the fight ...). As an indication, the outcome of the battle is set by default on the variable 1. This is what is used in vanilla scripts to know, for example, if the Pokémon of a fixed encounter has been captured (and disable its event if necessary).

Finally, do not forget to reset the tag or the variable to its initial value once the consequences have been applied. (To avoid that the game thinks you killed another Pokémon in the next battle).
A solution to never forget to do this is to place the code that resets this variable at the beginning of each fight.