Name: | Magic Limit |
Author: | spooonsss |
Added: | |
Type: | Level |
Includes GFX: | No |
Includes Hijack: | Yes |
Featured: | No |
Description: | Limits the number of spawned magikoopa magics (and sprites they turn into). If the limit is reached, the oldest sprite is despawned. (Screenshot shows limit of 3) |
Tags: | filter lorom sa-1 sprite |
Comments: | 3 (jump to comments) |
Rating: |
Download
1.54 KiB | 144 downloads
Comments (3)
- Lunar Magic v3.33
- SA-1 Pack v1.40
- UberASM Tool v1.5
- Asar v1.81 (for the unpatch)
- BSNES v115
One thing to note is that this is somewhat unstable in the sense that you should always use the unpatch should you remove the code as the magic init code will point to garbage and crash the game (it's actually this reason why some — including me — don't like the inclusion of hijacks with UberASM).Since there is an easy workaround for this (if you intend to not use it, just use the unpatcher), I decided to pass it since I haven't found any other issues.
Sure, you can "JSL read3($01FFFC+1)+7" with the sprite index in x. e.g. you can put it in the magic init routine (and ensure that the sprite is being spawned with state=1 aka init).
magikoopa_magic_20.asm
Note that running UberASM may change where the code is, so be sure to always run Pixi again after running UberASM.
The magikoopa disassembly spawns magic in state 8. Change 08 to 01 here to spawn it in the init state: