Language…
16 users online: anonimzwx, bradcomp, codfish1002, Danik2343, deported, Domokun007, Golden Yoshi, Heitor Porfirio, iamtheratio, Knight of Time, ModernKiwi, mtheordinarygamer, Sammmoo,  StayAtHomeStegosaurus, Tomi P, xxxblackangel2208xxx - Guests: 276 - Bots: 270
Users: 64,795 (2,375 active)
Latest user: mathew

Teleport Player When Hit by Enemy

OpenASM

Not sure if this is Level ASM, or would simply be something that needs to be inserted into a sprite's code - but I would like to request help with finding a way to teleport the player to either a screen's specified exit, or to a specific level/exit defined in code when the player is damaged by an enemy. Ideally, the player would not take any damage when this happens though (i.e. if Cape Mario is hit in the bonus level with this ASM, when teleported back to the main level he would still be Cape Mario instead of Super/Small Mario)

I imagine this to function very much like Donkey Kong Country 2 and 3's Bonus Games. This video demonstrates the behavior well:



When raocow hits the bee at 10:20, it teleports him out of the bonus game and back to the level.

It would be extra cool if a sound effect could play when this happens, but since I am not certain how complex this request is I don't want to push it.

Let me know if any clarification is needed. Thanks!

EDIT UPDATE (11/25/21)
I could've sworn that I saw something similar to my request in the past, and after another dive into the Patches section I found this: https://www.smwcentral.net/?p=section&a=details&id=22885

The linked patch is pretty close to my request, but since it is a patch it would happen for the whole hack. I'd prefer the teleport on hurt to happen only in specific levels. My first thought is that maybe this code could be converted to UberASM to allow for individual level insertion, but it would also be awesome to be edited to warp the player when they get hurt/touch an enemy as opposed to when the player would normally die.
This seems reasonable to convert to UberASM. I can try.
Rock and roll! Thanks, DarkBOO!m :D

Changing status to Claimed.
Vivian is banned, so the request remains unclaimed.
Your request has been automatically canceled and archived as it is older than 30 days and has not been claimed. More information on why this happens can be found here.

Please feel free to re-request it again by making a new thread, or request something else.

OpenASM