FL
Pokémon Island Creator
- 2,544
- Posts
- 14
- Years
- Seen yesterday
Just use a simple conditional branch with my method result value:That was the problem thanks, now i have a question how can i use the script to choose a partner? For example i define three tainers in the script and i want to choose one of them to be my partner.
Code:
overworld = ["trchar000","trchar001","trchar002","trchar003"]
battle = ["trainer000","trainer001","trainer002","trainer003"]
result = pbCharacterSelection(overworld,battle)
if result==0
pbRegisterPartner(PBTrainers::HOOPYTRAINER,"Zaphod",0)
elsif result==1
pbRegisterPartner(PBTrainers::OTHERTRAINER,"Purple",0)
elsif result==2
pbRegisterPartner(PBTrainers::ANOTHERTRAINER,"Gray",0)
elsif result==3
pbRegisterPartner(PBTrainers::ONEMORETRAINER,"Brown",0)
end
Since this code is too big for a Script Event Command, I suggest you to put it above main, between a line with "def insertSomeMethodNameHere" and "end", and call it on the Event.