Tip: If you place a moon, midpoint, or dragon coin through Map16, it will always respawn whenever you reenter that sublevel. It will not respawn if you add it through the Add Objects/Extended Objects window.
With this code, you can easily create a unique password system for your level. Define inputs that have to be done in the correct order and one of these things will happen:
-Kill the player
-Hurt the player
-Give the player 1-UP(s)
-Give the player a Power-UP
-Give the player some coins
-Give the player Star-Power
-End the level (normal exit)
-End the level (secret exit), triggers the keyhole animation
-Spawn a sprite
-Change ON/OFF Switch state
-Teleport to current screen exit
-Teleport the player to the overworld, no event triggered
-Teleport the player to a different overworld position
Every option is very customizable, so make sure to change the defines in the asm file.
- You can now define an unlimited amount of inputs and not only 10
- HUGE code optimization making the code about 200 lines shorter
- P-Switch music now correctly plays
- Sprites now turn into silver coins when using the silver P-Switch
Can confirm, the "A" input does not work at all. This code needs a bugfix. Also why "A" or "B", shouldn't they be separated inputs? Same with X and Y. Why not separate inputs? This hurts the usability of this ASM a bit. Next version would be nice to fix that.
Tested with: LM 3.10, UberASMTool 1.4, SA-1 1.32, pixi 1.2.12, Snes9x 1.60.
Indeed a nice update, glad you fixed the couple of issues of the previous version and I saw a lot of improvements in the code. Also very nice that now you can define codes of arbitrary length.
As westslasher said you could also decrease the code for spawning normal/custom sprites since almost all of it is shared, but since doing this doesn't affect the insert size it doesn't really matter.