I think the title is self-explanatory. I'm having problems trying to figure out how to increase the maximum amount a Counter can have by collecting Pieces of Heart.
The only way I see this is is possible is to use an Active Object act as a counter, but that can be tedious. Anyone have a better way to do it?
use a global value to store the maximum health possible. then compare your current health with the maximum health. not sure if thats what you mean tho.
Originally Posted by cec¿l use a global value to store the maximum health possible. then compare your current health with the maximum health. not sure if thats what you mean tho.
Yeah, that would work, but the player has to memorize how much is the max. I want like, in Zelda games, when the heart places look empty. But if that isnt attainable I'll settle.
You're using an image counter for the hearts, right? Why not put a second image counter of empty heart shells beneath the health, set to the max hearts value?
Hmm... looking at MMF2, I can't seem to figure out what they did with the ability to make a counter act like the default lives object, like a tally of images. Weird. So maybe a lives object for the current health, and a lives object for the empty heart frames would be a quick implementation, unless you want to hardcode it yourself.
"Omg. Where did they get the idea to not use army guys? Are they taking drugs?" --Tim Schafer on originality in videogames
if youre using tgf, the life counters can get lost behing actives. pretty stupid i think.
i suggest using actives and a fastloop for the effect you want.
You should use an internal value to record how many heart pieces are picked up, them make the maximum amount of heart one forth of the number.
(probably best to start it at 12 to give you 3 hearts)
Don't use the life object to show this though. Just use an active object to display the maximum possible hearts and another to show how many hearts link has at any given time.
andy - how do you recommend using an active to show max and an active to show current. youd need many frames for the changing max and current hearts. i've got an example almost complete, and commented, that works perfectly so far, with fastloop, just need to get rid of a flicker problem.
theres a few problems with that. the max hearts is always displayed. in zelda the max on screen changes just like the current hearts. when you collect 4 heart peices a new heart container appears. you can fix it by doing the same to the max as you did to the current. also its limited to 32 directions meaning 31 hearts (0 to 31 = 32 directions) and 32 heart containers (1 to 32 = 32 directions). this is a problem when in zelda you can have half and even a fourth of a heart filled.
with the fast loop one and using actives you can have unlimited hearts/containers with half and fourth hearts. its much more flexible as well. im still cleaning up the flicker tho.
only drawback is that it will use up actives that are limited in tgf.
yup. thanks.
btw id really like to see how you would handle some of the things i mentioned in yours. im intrigued cause i couldnt see a way around them without excessive coding
you could. like for a save game file? just save the max and current to the ini. i don't use ini's that often so ive forgotten how. look up a tut if you don;t know how.