Go Back   The PokéCommunity Forums > Creative Discussions > Game Development > Pokémon Essentials
Reload this Page Where is the position of the enemy hp bar defined?

Notices
For all updates, view the main page.

Pokémon Essentials All questions and discussion about Pokémon Essentials, the Pokémon game kit for RPG Maker XP, go in here. Also contains links to the latest downloads and the Essentials Wiki.



Reply
 
Thread Tools
  #1    
Old December 27th, 2012 (03:29 AM).
khkramer's Avatar
khkramer khkramer is offline
 
Join Date: Apr 2010
Gender: Male
Posts: 248
When I change the HPGAUGE_X value the player hp bar moves.
The enemy hp bar just disappears or move offscreen..
Where can I define the position of the enemy hp bar?
__________________

Check out the MMORPG I'm developing:

• Trading • PvP • Co-Op
Reply With Quote
  #2    
Old December 27th, 2012 (04:37 AM).
Maruno's Avatar
Maruno Maruno is offline
Lead Dev of Pokémon Essentials
Moderator
 
Join Date: Jan 2008
Location: England
Posts: 4,552
Both bars use the same coordinates. Something that is in a different place depending on whether it's for a user's Pokémon or an opponent is the shininess star, so you could have a look at that to see what to change.
__________________
Reply With Quote
  #3    
Old December 27th, 2012 (08:22 AM).
khkramer's Avatar
khkramer khkramer is offline
 
Join Date: Apr 2010
Gender: Male
Posts: 248
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:

Quote:
self.bitmap.fill_rect(@spritebaseX+hpGaugeX,hpGaugeY,hpgauge,2,hpcolors[hpzone*2])
self.bitmap.fill_rect(@spritebaseX+hpGaugeX,hpGaugeY+2,hpgauge,4,hpcolors[hpzone*2+1])
How does it possible draw two of them with only this?
__________________

Check out the MMORPG I'm developing:

• Trading • PvP • Co-Op
Reply With Quote
  #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: 911
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
Reply
Quick Reply

Sponsored Links

You may also like.. (Beta)
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are UTC -8. The time now is 12:00 PM.