Language…
17 users online:  Alex,  AmperSam, AntonioDosGames, aroohwahoou,  Atari2.0, cherrybombr, Diary of a Madman, Doc-red, Knetog, luigi doll, Maw, Nipitah,  NopeContest, ocked, Somebody for sure, Steven,  TickTockClock - Guests: 78 - Bots: 173
Users: 58,131 (2,459 active)
Latest user: TuNieViel

Hurt/Die when falling from a high place

I want to know how to make Mario hurt from falling high places. Also, the same thing, except you die.
There is only one way I can think of. Do you know how to write an ASM patch?

First would be to hack the status bar routine so you can use frames, and write something that would check how many frames Mario is in the air. If he is in the air for a certain amount (use CMP and BPL) of frames (time), then it would jump to a routine that checks when he is on the ground, and JSL to the hurt routine, STZ the frame counter so that it only hurts him once, and maybe bypass the code if you have a cape or Yoshi.


I've removed my NoFades patch until I can find the brightness code for Star Road warps.
Just a minor addition, you might want to only increment the 'in air' counter to only increment when mario is falling (speed is not signed).
You could just patch the routine where it sets mario's Y velocity to 0 if you're on ground to hurt him if the Y velocity is over X amount right before it's changed.
It'd also be easy to make him switch to a different frame, so it'd look like he's panicking when he hits the required height.
What? Why don't I have a fancy post layout? Pah, who needs an eyesore like that?