View Single Post
  #4    
Old December 27th, 2012, 12:47 PM
Luka S.J.'s Avatar
Luka S.J.
S.J.Ware HD
 
Join Date: Dec 2008
Age: 21
Gender: Male
Nature: Adamant
Quote:
Originally Posted by khkramer View Post
Sorry but I don't get it.
How can they both use the same coordinates.
The only thing I see that defines how the bars are drawn is this code:

How does it possible draw two of them with only this?
Because of this:
Code:
@sprites["battler0"]=PokemonDataBox.new(battle.battlers[0],battle.doublebattle,@viewport)
@sprites["battler1"]=PokemonDataBox.new(battle.battlers[1],battle.doublebattle,@viewport)
As you can see, both of the battle boxes use the same class when they are loaded up and called up. There are some differences in the two though, like the player box has @showhp=true and @showexp=true. So if you were to create conditional branches to check for those (hence distinguish from player and opponent boxes) you could tweak the positions of the HP bars to your desire.
__________________
[STOPPED][DEMO] Pokemon Blue Chrome
[DEVELOPING] S.J.Ware
[DEVELOPING] Tykanite
Reply With Quote