PDA

View Full Version : [Question] Variable for party of file path


Sauromon222
January 11th, 2012, 12:04 PM
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
January 12th, 2012, 06:57 AM
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)

Sauromon222
January 12th, 2012, 08:51 AM
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