Charas-Project

  • Home
  • Help
  • Search
  • Calendar
  • Login
  • Register
*
Please login or register.

Login with username, password and session length
 

News:

New forum theme up and running!



  • Charas-Project »
  • Game Creation »
  • Requests »
  • HUD help
« previous next »
  • Print
Pages: [1]

Author Topic: HUD help  (Read 2602 times)

Offline Dominicy

  • All men play on ten!
  • Leader
  • *
  • Posts: 2,852
HUD help
« on: April 25, 2008, 07:30:45 PM »
No hurry considering I've got a working HUD for my current game, but in the planned sequel the player will level up, and it'll be too much work to make the life bar grow with every level.  The problem is, I don't know how to change the length of the bar depending on what percent the character's at.

If that didn't make sense, I'll try to simplify it.  The life bar will be 50 or 100 pixels long, and I don't know how to make the life bar lengthen or shorten based on how much life the character has left.

I already tried the search button.  If this is the wrong section, I apologize, I haven't used the forum for anything RPGmaker related in awhile XD
Logged

Offline Emerates

  • A. Hermit Esquire
  • Exemplar
  • *
  • Posts: 1,027
    • Emerates' Freewebs Site
(No subject)
« Reply #1 on: April 25, 2008, 08:35:53 PM »
Try a digit thing instead.  Zum beispiel:

Assign the total amount of health to a variable, which changes for every level achieved or nut eaten, and the amount of health left another variable, which changes after every healing.  Then, have this variable counter displayed on the screen somewhere.

I'm not sure on details since I do very little advanced programming, but hopefully this will put you on the right track.  If you can't figure this kind of system out, try using a picture system based on value input or something.  Hope it helps!
Logged

Offline Dominicy

  • All men play on ten!
  • Leader
  • *
  • Posts: 2,852
(No subject)
« Reply #2 on: April 25, 2008, 09:51:08 PM »
That could work.  The next problem is that I don't know how to display a variable on screen x_x
Logged

Offline Percival

  • Gaming Chronicles Owner
  • Initiate
  • *
  • Posts: 8
  • Gamer
(No subject)
« Reply #3 on: May 12, 2008, 07:02:25 AM »
if health left equals 10, display image 'health10' at x,y postition

that is how it should work, tell me if it doesnt...
Logged
~Now! This is it! Now is the time to choose! Die and be free of pain or
live and fight your sorrow! Now is the time to shape your stories! Your fate is
in your hands! Lead your sword to fall cities! To slice through mountains! Lead yourself to glory!~

Offline Dominicy

  • All men play on ten!
  • Leader
  • *
  • Posts: 2,852
(No subject)
« Reply #4 on: May 12, 2008, 07:34:02 AM »
I know how to do a conditional branch, my problem is that I don't know if there's an easier way to make the HUD than doing a list of as many as 250 conditional branches checking the character's health.
Logged

Offline Ben

  • Some dude
  • Staff
  • Royal
  • *
  • Posts: 4,844
  • butts
    • my portfolio
(No subject)
« Reply #5 on: May 12, 2008, 07:50:07 AM »
youre gonna need a million Branches, a few variables, and some show images attached to many of your branches
Logged

Offline Rayonius

  • Associate
  • *
  • Posts: 171
  • Patiently waiting, biding...
(No subject)
« Reply #6 on: May 12, 2008, 08:17:17 AM »
( (amount of health) / (maximum health) ) (100) = healthpercent

now take healthpercent, mod it by 1, subtract that amount from healthpercent, and you have %health rounded down to the nearest unit.

a.k.a. :  healthpercent - (healthpercent % 1) = health

now, health will be a whole number between 0 and 100
Logged
How's my spriting? 1-888-247-3650


  • Print
Pages: [1]
« previous next »
  • Charas-Project »
  • Game Creation »
  • Requests »
  • HUD help
 

  • SMF 2.0.10 | SMF © 2015, Simple Machines
  • XHTML
  • 2O11
  • RSS
  • WAP2
  • Simple Machines Forum