Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Need help with variables and HP

Hello I'm ghostboy and need alittle help with my battle system. It's made entirely by switches and variables. Everything with it is fine but the Hp part. Im trying to fix a variable to be set by the character's Hp. I've gone in and made= variable/Set/ to character HP but I cant go into the condition branch and say if character's Hp is 50% the bar goes down. If anyone can help, I'd be very greatful.
 
You can set another variable to MaxHP, then divide it by 2
Then your conditional would be:

Conditional Branch: Variable [0001: HP] < Variable[0002: HalfMaxHP]
# adjust your bar
: Branch End
 
would that variable be effected by the database? Im trying to set it up as if I make any chages the variable would be changed as well. In other words I need the variable to be set by that character's Hp in the database. Or a script that would show the characters HP and MP while in map mode would be helpful.
 
The database only gets used when you initialize the character. (New Game).

MaxHP is based on the character's level, and any modifiers that are currently active. (weapons, states, etc...)

You need to set the variables each time you want to redraw the bar. Or, any time they can change.

If you want to compress your game (not encrypted), and upload it somewhere, I'll take a look at your system & show you how to fix it.

Be Well
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top