• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Scripting Question] fainted pokemon [help/question]

32
Posts
6
Years
  • Age 32
  • Seen Sep 9, 2019
EDIT: SOLVED

hi there,;

so, i ve made it where i can walk around with no pokemon, where at starting over my whole team becomes [ ] , but im having trouble working around healing pokemon while deleting the fainted ones

to avoid removing them upon death (in case it happens while surfing and stuff) I wanna have it so that your fainted pokemon get erased once you actually go to the pokecenter and talk to the nurse.

.. anyway, im new to this whole thing so im having trouble deleting my fainted pokemon

are fainted pokemon even stored somewhere, so that i can just erase em ?
or do i have to manually store them in a variable or something?
 
Last edited:
1,677
Posts
8
Years
  • Age 23
  • Seen today
Well, the Recover All command is in PField_Field as def command_314 but that just calls def pbHealAll in PSystem_PokemonUtilities. and pbHealAll just calls the heal method in PokeBattle_Pokemon, def heal, which calls 3 different healing commands for HP, Status, and PP.

I think if you change def pbHealAll to go over the party by index, you could check if it was fainted with def fainted? or def isFainted? (they do the exact same thing, just another name) and delete it by setting that index to nil and compact! the party array.
 
32
Posts
6
Years
  • Age 32
  • Seen Sep 9, 2019
Well, the Recover All command is in PField_Field as def command_314 but that just calls def pbHealAll in PSystem_PokemonUtilities. and pbHealAll just calls the heal method in PokeBattle_Pokemon, def heal, which calls 3 different healing commands for HP, Status, and PP.

I think if you change def pbHealAll to go over the party by index, you could check if it was fainted with def fainted? or def isFainted? (they do the exact same thing, just another name) and delete it by setting that index to nil and compact! the party array.

for the moment i found a nuzlock script that makes it so that fainted pkmn dont get healed, but yes something along those lines is what i had in mind
.. i'll have to tinker with heall all, worse case scenario i still have the nuzlock one.

im gonna try that tho, thanz

Well, the Recover All command is in PField_Field as def command_314 but that just calls def pbHealAll in PSystem_PokemonUtilities. and pbHealAll just calls the heal method in PokeBattle_Pokemon, def heal, which calls 3 different healing commands for HP, Status, and PP.

I think if you change def pbHealAll to go over the party by index, you could check if it was fainted with def fainted? or def isFainted? (they do the exact same thing, just another name) and delete it by setting that index to nil and compact! the party array.

i think i was actually overthinking too much,
making the nurse check if there were pokemon with 0hp to errase em before healing the party was enough.
so i guess this is solved xD
 
Last edited by a moderator:
32
Posts
6
Years
  • Age 32
  • Seen Sep 9, 2019
.. man im even new to forums, do i have to do something after a thread is solved?
 
32
Posts
6
Years
  • Age 32
  • Seen Sep 9, 2019
for the moment i found a nuzlock script that makes it so that fainted pkmn dont get healed, but yes something along those lines is what i had in mind
.. i'll have to tinker with heall all, worse case scenario i still have the nuzlock one.

im gonna try that tho, thanz



i think i was actually overthinking too much,
making the nurse check if there were pokemon with 0hp to errase em before healing the party was enough.
so i guess this is solved xD

not true XD
back to the drawing board, again i'll try what you recommended
 
Back
Top