Natzen
Creator of Pokémon: Sanguine
- 49
- Posts
- 9
- Years
- Gruphasm, Darkan
- Seen Jul 11, 2023
Code:
$game_variables[125]=rand(149)+1
pkmn=pbGetPokemon(125)
pbSet(126,pkmn.name)
I'm sure there's plenty of faulty logic in what I'm trying to figure out.
Basically I'm trying to work a system where a player can use a telescope, stores a random number in variable 125 (in this example, between 1-149, vanilla kanto dex), sets pkmn equal to whatever value 125 is equal to.
Then whatever pkmn is, get .name and store in variable 126.
Theoretically I want to call variable 126 in a game message to say something like,
Woah - you see a \v[126] off in the distance
"Woah - you see a Dragonite off in the distance".
In the future I would probably like to only select from a certain list of mon, probably through a var.shuffle, then send them off to that map for a fateful encounter with the respective pokemon, upon defeat/capture resetting the variables of the [mini-game].
Anyways for now I'm just trying to figure out why I can't pull pokemon names from a variable, I'm pretty much using the same code found in the example where an npc tells you what pokemon is in your party. I just replaced the variables 1 and 2 with my own (125 - where the pokemon id is stored and 126 - where i want to store the name).
Code:
pkmn=pbGetPokemon(125)
pbSet(126,pkmn.name)
Last edited: