Language…
12 users online:  AmperSam, Blake Izayoi, codfish1002, ECS.98, etheruntz, h.carrell, hotfist.com, slakkmichael, Vanilla_salmonella, wurnt, Zavok, Zoreo - Guests: 88 - Bots: 132
Users: 62,957 (2,673 active)
Latest user: Gardevoir

Action on Enemy Defeat

UberASM Repository → Action on Enemy Defeat

Submission Details

Name: Action on Enemy Defeat
Author: Kevin
Added:
Type: Level
Includes GFX: No
Includes Hijack: No
Featured: No
Description: This UberASM will run an action whenever Mario defeats an enemy (killed by jumping on them, with cape, shells, star, sliding etc.). You can choose between some premade options (switch ON/OFF, hurt Mario, give coins or time) or add your own code. Check the asm file for additional information.
Requires 12 bytes of freeram (22 on SA-1).
Note that it doesn't work for enemies burnt with fireballs (besides Chucks, because they don't turn into coins).
Tags: lorom on-off sa-1 sprite
Comments: 2 (jump to comments)
Rating:
0.0 (0 ratings)
No rating
Download 1.51 KiB | 110 downloads

Screenshots

Comments (2)

HammerBrother Link
This is good for EXP-based system that rewards the player for killing enemies.
 zuccha Link
Tested with:
  • Lunar Magic 3.33
  • UberASM Tool 1.6
  • SA-1 Pack 1.40
  • Snes9x 1.62.3

I added an else clause to the action conditional raising an error if choosing invalid values for the action and/or the value (e.g., action > 5 or action 3, add coin, with value 0), which would otherwise crash the game. I also added the allowed values for coins (1-255) and time (> 0) in the comments describing action values.

Simple and easy to use UberASM. Worth noting that:
  • In addition to fireballs, this doesn't work for enemies that die due to silver p-switch activation or being eaten by Yoshi.
  • Pressing a p-switch causes the switch to die and trigger the action (I don't consider this a bug).

It might be interesting adding an allow/disallow list for limiting the behaviour only to a particular set of sprites, but this is just a random thought.