< >
Hello, guest! Please log in or register.

The PokéCommunity

Go Back     The PokéCommunity Forums > Create & Discover > Game Development > Pokémon Essentials Where is the position of the enemy hp bar defined?

Notices

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 Post 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,095
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: 22
Gender: Male
Nature: Adamant
Posts: 1,041
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 Post 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 6:06 PM.


Contact Us Archive Privacy Statement Terms of Service Top