Language…
31 users online: 1UPdudes, adamlucero, brickblock369, CalHal, Connnnair, Devazure, Green Jerry, grisu, GrumpyWalrus, HammerBrother, Heitor Porfirio, Humpty Dumpty Magazine, JetWing34,  K.T.B., Keckle, Knight of Time, kurtistrydiz, LPDGhost, MarioFan22, MegaSonic1999, NixKillsMyths, nlxt,  Segment1Zone2, signature_steve, SupernalXD02, SuperShahBro, tristawesome, underway, XolifreX, Zavok,  zuccha - Guests: 82 - Bots: 160
Users: 62,806 (2,616 active)
Latest user: skittles

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 | 107 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.