- 10
- Posts
- 5
- Years
- Seen Jul 25, 2020
I successfully created an evolution for Slowpoke that has him evolve at Lv 37 when you have a Shellder in the party. The only problem is, no matter how many different codes I tried, the single Shellder in the party would not delete after the evolution was complete.
Can someone please give me code to erase the Shellder after evo, and where to place it in this base code of mine:
I've tried everything I could think of on my own and anything I could find online, including defining a new command. In fact, I'll place that code here, in case I did something wrong there:
I found that code somewhere online and I put it in its own section above Main, then placed the line PBdeleteFirst(:SHELLDER) under return poke if i.species==level && pokemon.level>=37
Did I perhaps do something wrong here?
Any help would be greatly appreciated!
Can someone please give me code to erase the Shellder after evo, and where to place it in this base code of mine:
Code:
# Add code for custom evolution type 1
when PBEvolution::Fusion
for i in $Trainer.pokemonParty
return poke if i.species==level && pokemon.level>=37
end
I've tried everything I could think of on my own and anything I could find online, including defining a new command. In fact, I'll place that code here, in case I did something wrong there:
Code:
def PBdeleteFirst(species)
species = getConst(PBSpecies,species) if !species.is_a?(Numeric)
for i in 0...$Trainer.party.size
$Trainer.party[i] = nil if $Trainer.party[i].species == species
break
end
$Trainer.party.compact!
end
I found that code somewhere online and I put it in its own section above Main, then placed the line PBdeleteFirst(:SHELLDER) under return poke if i.species==level && pokemon.level>=37
Did I perhaps do something wrong here?
Any help would be greatly appreciated!