• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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
13
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...
     

    Rai Rai

    Master of everything!
    262
    Posts
    13
    Years
    • Seen Aug 29, 2012
    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)
     
    9
    Posts
    13
    Years
  • 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