The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Create & Discover > Game Development > Pokémon Essentials
Reload this Page Where is the position of the enemy hp bar defined?
Sign Up Rules/FAQ Daily Battle Blogs Mark Forums Read


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 (3:29 AM).
khkramer's Avatar
khkramer khkramer is offline
 
Join Date: Apr 2010
Gender: Male
Posts: 250
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?
__________________


MMO. New thread coming soon.
Reply With Quote

Relevant Advertising!

  #2    
Old December 27th, 2012 (4:37 AM).
Maruno's Avatar
Maruno Maruno is offline
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
Posts: 5,133
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 (8:22 AM).
khkramer's Avatar
khkramer khkramer is offline
 
Join Date: Apr 2010
Gender: Male
Posts: 250
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?
__________________


MMO. New thread coming soon.
Reply With Quote
  #4    
Old December 27th, 2012 (12:47 PM).
Luka S.J.'s Avatar
Luka S.J. Luka S.J. is offline
Jealous Croatian
 
Join Date: Dec 2008
Location: Croatia
Age: 23
Gender: Male
Nature: Adamant
Posts: 1,052
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.
Reply With Quote
Reply
Quick Reply

Sponsored Links
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 GMT -8. The time now is 9:24 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2016 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2016.