Aha, that makes sense.
That application would stretch to ZScript as well, if you can do that in ZScript.
Man, I have recommended that SO many times... I think this is just something ZC should naturally have. It can be so very useful...Incidentally, we should have a slot 4 global script that triggers on Link's death. It would get to run for one frame, and if Link's HP is still zero after that, he dies for real.
I mean even having it check to see whether Link's Health is near .0001% health is entirely impractical because there are attacks which do just enough damage to bypass that critical checking point. So it'd be something like, if(Link->HP <= 1%(Link->MaxHP){etc} or whatever it'd be. (Never was too clear on the syntax.) and that'd work just fine, because it'd also be able to accommodate Link being at less than zero health.
I'm just reiterating what I had quoted.
To give the game at least one frame of confirmation that Link's Health really is at zero before giving the game over screen, to allow scripts to run or restore his health and do whatever else the scriptmaker wants it to do. I had no intention of mentioning value types.It would get to run for one frame, and if Link's HP is still zero after that, he dies for real.
Oh wait you have '1%Link->MaxHP' rather than '1/Link->MaxHP'.
I thought you'd put a back-slash, and in which case you'd have a value smaller than one. In which case, if the integer value is less then a number smaller than one then it has to be zero anyway, so you may as well have put 0. So this is why I'm confused.
Now I'm confused too.
Okay. Let's backtrack. Let's not think of any C++ here. Let's think of the practical, pragmatic purposes for the discussion here.
We need a single frame between Link's HP being 0 or whatever, and the Game Over screen. Let's talk about that, please? I'm seriously getting confused and bewildered that nothing I'm saying is getting across with any sign of acknowledgment.
Oh, sorry.
I agree that we should have a global script that runs when Link dies, but I know full well that I'm not currently capable of adding that in in the slightest.
I wasn't sure whether you were suggesting that line of code to be added into a script, or into ZC's code itself.
'cause it wouldn't really be much use actually in ZC. I'm pretty sure (althought I may well have missed it) that there isn't even a Link object in ZC's code.
I know I'm just being pedantic there (there is a LinkData object), but even so it'd be a lot more complicated than that.
There are currently 1 users browsing this thread. (0 members and 1 guests)