- 6
- Posts
- 9
- Years
- Seen Nov 26, 2014
So, I'm working on the basis for my entire rom hack, the fact that pokemon are gone forever after they reach the hp of 0. I'm using JPAN's hack engine to do so, it contains absically all the commands needed for me to accomplish this (I believe).
How I want to make the script operate is by having it check the hp of each slotted pokemon after a battle, and if any of those pokemon have reached the hp of 0, to simply delete them. The special commands I know I need, are these:
Special 0x6 (Decrypts pokemon data)
Special 0x65 (Checks HP of a specific pokemon slot) (Returns value of hp)
Special 0x62 (Deletes all or one party pokemon)
Setvar 0x8004 (Sets the slot to check/delete)
The questions I'm running into are how to make the script activate after a battle, how to use the returned hp value to determine whether it deletes the pokemon or not, and how to make it delete multiple pokemon if multiple pokemon reached 0 hp.
Any pointers, or examples of how this script could work?
Thanks!
How I want to make the script operate is by having it check the hp of each slotted pokemon after a battle, and if any of those pokemon have reached the hp of 0, to simply delete them. The special commands I know I need, are these:
Special 0x6 (Decrypts pokemon data)
Special 0x65 (Checks HP of a specific pokemon slot) (Returns value of hp)
Special 0x62 (Deletes all or one party pokemon)
Setvar 0x8004 (Sets the slot to check/delete)
The questions I'm running into are how to make the script activate after a battle, how to use the returned hp value to determine whether it deletes the pokemon or not, and how to make it delete multiple pokemon if multiple pokemon reached 0 hp.
Any pointers, or examples of how this script could work?
Thanks!