View Single Post
  #4    
Old December 27th, 2012 (12:47 PM).
Luka S.J.'s Avatar
Luka S.J. Luka S.J. is offline
@LukaSJ0
 
Join Date: Dec 2008
Location: Croatia
Age: 22
Gender: Male
Nature: Adamant
Posts: 892
Quote originally posted by khkramer:
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.
__________________
Reply With Quote