Jump to content

Photo

Life Potion


  • Please log in to reply
15 replies to this topic

#1 Joe Dirt

Joe Dirt

    Wizard

  • Members

Posted 12 November 2007 - 01:57 PM

Is it possible to make a Link's Awakening style potion that automatically refills your hearts when they reach zero (thus leaving your inventory)?

#2 NineLives

NineLives

    Boom. Zoom. Dakota.

  • Members
  • Location:Los Angeles, California

Posted 12 November 2007 - 02:13 PM

yes, but I dont have the ability to do that icon_razz.gif

#3 Joe123

Joe123

    Retired

  • Members

Posted 12 November 2007 - 02:13 PM

Hmmm

You might be able to do it with a custom item, and I think on a counter.
I'd have to get confirmation from someone who better knows what they're doing here, could you:

Set a pickup script to the item to up a counter, which isn't displayed on the subscreen and has max value one
Then set the global script to check if that counter's greater than 0, and if Link's HP == 0, then if it's true, set his HP to 16 or whatever, and reduce the counter by one?

It depends whether ZC waits a frame while Link is on 0 hearts before he dies I suppose

Edited by Joe123, 12 November 2007 - 02:15 PM.


#4 Nimono

Nimono

    Ultra Miyoa Extraordinaire!

  • Members
  • Real Name:Matthew
  • Location:Static Void Kingdom

Posted 12 November 2007 - 02:21 PM

No. Trust me, NO. I tried it once, but the Death animation and stuff play BEFORE the script works. Seriously, trust me on this. IT DOESN'T WORK.

#5 Joe123

Joe123

    Retired

  • Members

Posted 12 November 2007 - 02:33 PM

Aww icon_frown.gif
That's no good then. I don't suppose there would be any other way?

#6 Joe Dirt

Joe Dirt

    Wizard

  • Members

Posted 12 November 2007 - 02:33 PM

Any way you could get the script to kick in, say, when you reach 1/8 or 1/16 of a heart?

#7 Joe123

Joe123

    Retired

  • Members

Posted 12 November 2007 - 02:41 PM

That sounds very much possible, yes.

#8 NineLives

NineLives

    Boom. Zoom. Dakota.

  • Members
  • Location:Los Angeles, California

Posted 12 November 2007 - 02:52 PM

or one (half) heart icon_biggrin.gif
if your not using the 1/4 rule.

#9 Joe Dirt

Joe Dirt

    Wizard

  • Members

Posted 12 November 2007 - 03:29 PM

One half wouldn't be good. I want it to be a fraction so small that it doesn't show up on the Life meter. The game still knows exactly how much HP you have, even if you are using the classic Life meter.

#10 ShadowTiger

ShadowTiger

    The Doctor Is In

  • Members

Posted 13 November 2007 - 11:40 AM

How do we know that an attack would be so powerful as to skip right from, say, two hearts, down to less than the minimum? (I.e. zero hearts.) The potion wouldn't do a hell of a lot then.

I suggested that they at least add a waitframe quite a while ago, but it never really saw the light of day.

#11 Joe Dirt

Joe Dirt

    Wizard

  • Members

Posted 13 November 2007 - 01:40 PM

I was thinking that if your hearts dropped below 1/16, the script would take action before the game recognized it as a death.

#12 Joe123

Joe123

    Retired

  • Members

Posted 13 November 2007 - 03:31 PM

You could try that, although Matthew seemed to think it wouldn't work.

I suppose it's too late for them to add a frame now.

Edited by Joe123, 13 November 2007 - 03:31 PM.


#13 LostInHyru1e

LostInHyru1e

    Can you take me as far as PureZC?

  • Members
  • Real Name:Lost
  • Location:Refer to Screename

Posted 13 November 2007 - 08:24 PM

Why couldn't they add it in the final 2.5?

#14 C-Dawg

C-Dawg

    Magus

  • Members

Posted 13 November 2007 - 11:07 PM

You can certainly script this, it just requires a little subscreen work.

Set up your passive subscreen so that the first four (or however many) hearts held by the player are invisible. Say, cover it with a stylized graphic that looks like the start of the heart bar. Then, if the player gets below four hearts, either (1) refill life if the player has the fairy in a bottle item, maybe play animation and sound; or (2) kill off the player if not.

#15 Russ

Russ

    Caelan, the Encouraging

  • Administrators
  • Location:Washington

Posted 13 November 2007 - 11:15 PM

QUOTE(C-Dawg @ Nov 13 2007, 08:07 PM) View Post

You can certainly script this, it just requires a little subscreen work.

Set up your passive subscreen so that the first four (or however many) hearts held by the player are invisible. Say, cover it with a stylized graphic that looks like the start of the heart bar. Then, if the player gets below four hearts, either (1) refill life if the player has the fairy in a bottle item, maybe play animation and sound; or (2) kill off the player if not.

Why didn't we think of that? This would require a global script and an item script, so it could get pretty complicated. I'll work on it and see what I can come up with.

And LostInHyru1e, it can't be added to 2.5 because ZC is on a feature freeze. To make it work without some subscreen gimic, it would require a substantual rewrite of the code to make the game run a few frames after Link dies, and would probably make the game quite buggy.

Edit: Um, how do you check if Link has an item in his inventory? And || means and, right?

Edited by russadwan, 13 November 2007 - 11:24 PM.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users