The Daily Click ::. Forums ::. Klik Coding Help ::. Zelda Pieces of Heart/Increasing the maximum health a character can have.
 

Post Reply  Post Oekaki 
 

Posted By Message

Devernath



Registered
  04/12/2004
Points
  54

VIP Member
10th March, 2008 at 18:53:53 -

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?

 
n/a

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
10th March, 2008 at 18:57:59 -

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.

 
n/a

Devernath



Registered
  04/12/2004
Points
  54

VIP Member
10th March, 2008 at 19:27:54 -


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.

 
n/a

Noyb



Registered
  31/05/2004
Points
  1117

VIP Member
10th March, 2008 at 21:45:19 -

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

Devernath



Registered
  04/12/2004
Points
  54

VIP Member
11th March, 2008 at 03:43:37 -

Noyb, i tried that, but apparently any action the health on top of it makes make the empty heart imagecontainer disappear. Stupid glitchy tgf.

 
n/a

NeoMonkey

Finnish Army Fire Commander

Registered
  01/12/2006
Points
  243

VIP Member360 OwnerI am an April FoolPS3 Owner
11th March, 2008 at 07:21:18 -

Use active object with 4 animations and global values. Or then lives object, with image and draw there the animation.

 
I have proven new mathematic formula to be true...

2D > 3D

Image


Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
11th March, 2008 at 12:41:11 -

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.

i can provide a simple example if you like.

 
n/a

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
11th March, 2008 at 13:01:34 -

This should be really easy to do.

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.

 
.

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
11th March, 2008 at 13:41:48 -

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.

Image Edited by the Author.

 
n/a

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
11th March, 2008 at 14:07:12 -

i just made an example too,

http://www.ectoprods.com/uploads/hearts.zip

 
.

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
11th March, 2008 at 14:21:35 -

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.

Image Edited by the Author.

 
n/a

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
11th March, 2008 at 16:31:13 -

and also andy, in zelda, when theres more than a certain amount of maximum hearts it starts a new row or hearts. mine can handle that too.

fixed flicker and am ready to upload my example. there isnt support for half or fourth hearts but it wouldnt be that hard to implement it.

http://www.mediafire.com/?ijmxxlthzba

Image Edited by the Author.

 
n/a

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
11th March, 2008 at 18:42:08 -

That stuff you said is quite easy to implement to mine.
But hey, yours is good.

 
.

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
11th March, 2008 at 19:02:20 -

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

how are things on your end eric?

edit whoops not eric. wrong post. lol.

how are things on your end Devernath

Image Edited by the Author.

 
n/a

Devernath



Registered
  04/12/2004
Points
  54

VIP Member
11th March, 2008 at 21:41:44 -

Seems to work well, but could you save this to an ini file? the max hearts and so forth

Image Edited by the Author.

 
n/a

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
11th March, 2008 at 21:44:24 -

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.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click