• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Variable for party of file path

  • 9
    Posts
    14
    Years
    I was wondering how I would make the sprite dependent on a variable such as the species number
    So far I have:

    @sprites["party1"]=IconSprite.new(150,85,@viewport)
    @sprites["party1"].setBitmap("Graphics/Battlers/"$Trainer.party[1].species)

    But it doesn't work :(
    Tips please...
     
    I don't get this, the moderators made a section now specifically for Pokemon essentials related threads and people still can't post in the right area.

    Try something like this
    @sprites["party1"] = IconSprite.new(150,85,@viewport)
    @sprites["party1"] .setBitmap("Graphics/Battlers/%03d",$Trainer.party[1].species)
     
    I don't get this, the moderators made a section now specifically for Pokemon essentials related threads and people still can't post in the right area.

    Try something like this
    @sprites["party1"] = IconSprite.new(150,85,@viewport)
    @sprites["party1"] .setBitmap("Graphics/Battlers/%03d",$Trainer.party[1].species)
    ty i'll try that
    sorry about it being in wrong section i'm new
    ---edit----
    it did work but i had to change it just a little
    @sprites["party1"] = IconSprite.new(150,85,@viewport)
    @sprites["party1"].setBitmap(sprintf("Graphics/Battlers/%03d",$Trainer.party[1].species))
    I 'm going to change the trainer card so it shows ur team on it! ;p
     
    Last edited:
    Back
    Top