Player chooses from list of sprites?

3ct

Warper
Member
Joined
Jun 12, 2016
Messages
1
Reaction score
0
First Language
English
Primarily Uses
This isn't the ideal place to ask Pokémon Essentials-related questions, but no one is helping me over at Pokécommunity so...


Anyway, there's an event in my game that activates a quest as long as the player has a certain pokémon in his party. The player chooses the specified pokémon and his sprite is thereupon turned into said pokémon with $game_variables[34]=X, X being the name of the sprite in Graphics/Characters. (The PNG file name has to be followed with an "n" and/or an "r," because that's just the nature of Essentials. It differentiates walking and running animations.)


Here's a picture of the event: Event with Constant


Now, the problem with this is the player has to abide by very specific parameters in order to start the quest. Instead, I want the player to be able to choose ANY pokémon in his party and become that sprite. These sprites live in a folder called "Overworld," separate from "Characters." Here's an idea of what the script could look like:


def pbPokeSpriteFile #calls the action
if $Trainer.party.length>0 #checks to see if the player has 1 or more pokémon
outfit=$Trainer ? $Trainer.outfit : 0 #not sure if this does anything
pbChoosePokemon(1,34) #opens pokémon selection screen.
if pbGetPokemon(1).isShiny?
$game_variables[34]=sprintf("Graphics/Overworld/%03ds",poke) #ignore this
else
bitmapFileName=sprintf("Graphics/Overworld/%s%s",
getConstantName(PBSpecies,species)) rescue nil
bitmapFileName=sprintf("Graphics/Overworld/%03ds%s",34,outfit)
return bitmapFileName
$game_variables[34]=bitmapFileName #here, 34 is the player's sprite
end
end
end


Now, this would either result in argument errors or it'd simply just erase the player's sprite entirely, as if the script and the "Overworld" sprites weren't communicating. After pbChoosePokemon, I'm pretty much clueless as to how to relate the player's choice to the respective PNG file in the "Overworld" folder. I could do each pokémon individually, since I can't seem to understand how "sprintf" works, but there's still the problem of changing $game_variable[34] to anything outside of the "Graphics/Characters" folder.


I'm using RPGMaker XP with Pokémon Essentials. Thanks for any help in advance.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,975
Members
137,563
Latest member
cexojow
Top