- 115
- Posts
- 15
- Years
- Seen Sep 4, 2023
Hello Guys!
I'm having trouble writing a code that returns a trainer's internal name.
More specifically, I'm generating a trainer randomly from a list and I want to get his trainer type.
I'm trying something like this:
I wanted to generate the internal name, something like
The code I use however gives me the name "Nurse" in type instead.
How do I get the internal name?
Thanks!
I'm having trouble writing a code that returns a trainer's internal name.
More specifically, I'm generating a trainer randomly from a list and I want to get his trainer type.
I'm trying something like this:
Code:
#trainers is an array containing many trainer types
trainer = trainers[rand(trainers.length)]
#here I get the name of the Trainer type generated
type = PBTrainers.getName(trainer[0])
#However this is the displayed trainer's name, as displayed in a battle for instance.
Code:
PBTrainers::NURSE
How do I get the internal name?
Thanks!
Last edited: