Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[solved] More than 500?????how could it be?
#2
Health-bars are optimized for 500hp. That's hardcoded. It guarantees a flawless working under normal circumstances. In fact, you can increase the normal red to ~510 or so :p

I haven't checked out the logic behind the bar-drawing, but I assume it's just some random division-stuff (seeing that around 5hp or something like that map onto 1px) together with modulo-madness.

Generally, you can get as many hp as possible (or as many as the variable-type supports (guess something like 2^32)), it's just that the hp-bar doesn't work then. This is the reason why it's good style to spawn a milk bottle after healing to revert the hp to 500 in case it was over (refer to >this<).


@v: harr harr, I'm a ninja :ninjad:
Silverthorn / Blue Phoenix
~ Breaking LFE since 2008 ~

"Freeze, you're under vrest!" - Mark, probably.

» Gallery | » Sprites | » DeviantArt
Reply
Thanks given by: A-Man


Messages In This Thread
RE: More than 500?????how could it be? - by Silverthorn - 01-31-2012, 05:56 PM
RE: More than 500?????how could it be? - by A-Man - 02-01-2012, 05:33 AM
RE: More than 500?????how could it be? - by A-Man - 02-01-2012, 06:43 AM
RE: More than 500?????how could it be? - by A-Man - 02-03-2012, 04:36 AM



Users browsing this thread: 1 Guest(s)