Log in

View Full Version : OnDeath() {



ShadowTiger
01-05-2007, 12:25 PM
Forgive me if this is already implemented, but I had an idea for a Death Handler.



OnDeath(Link->MaxHP > 3)
{
Link->Rupees = --3;
}


I know I butchered a lot of that, but you get the idea. That being but an example, I can run through the concept in terms of what it could accomplish. Suppose you had more than three heart containers. If you did, it would deduct three rupees when you died. If you didn't have more than three HC, it wouldn't. Think of it as a "Beginner's safety net." Just a little something you could code in. Hell, if you were vicious, you could reverse the > sign and change it to a < and change the 3 to a 12, and cater only to those who have already tested their mettle. You could even deduct a heart container piece or something, assuming you could buy more from shops. (Yay Mock Experience Counters... ...) And, since this is a script, you could place it not in a global script, but in an FFC script in a single room, (Or more than one.) and have death conditions in certain rooms. Make the death penalty free for bosses, but higher or lower for certain dungeons. Maybe even set a continue flag if you died in a place, whereas that continue flag wouldn't be set if you hadn't died yet.

Maybe, ... just maybe, ... you could even circumvent death entirely, and have it warp you to a different room and restore your health if your health goes into the 0 or negatives, rather than taking you to the death scene. (Though I hear that's hardcoded and unavoidable.) Or perhaps it could just warp you to that scene AFTER the death scene. (Hard to do as well, I'd wager.)

Mhm. Thoughts?

C-Dawg
01-05-2007, 08:00 PM
Whenever you die, you lose a heart container?

Holy shit, sign me up, Batman. I love torturing the player!

ShadowTiger
01-05-2007, 10:26 PM
... ... Um ... ... Yeah. Play Neverwinter Nights and you'll find no end of OnDeath XP Handlers.

I swear, one of these days, I've got to get a Sarcasm detector. Holy shit Batman indeed.

jman2050
01-05-2007, 10:39 PM
Actually, I had planned to convert Link's code to scripts, with one of the scripts being a death script. I'm don't think that'll come before 2.5, but we'll see what happens.