Banner
Views: 794,481,105
Time:
19 users online:  1UPdudes, Azmaranda, BlueZy, Daizo Dee Von,  Deeke, DKR_02, Exodustx0, Galleth Cooper,  Giftshaven, Hiro-sofT, Infinity,  Maarfy, Mogu94, MuMu, Neeberz, Samantha, VLSkoot, wuanter, Zerio - Guests: 44 - Bots: 172 Users: 41,468 (1,505 active)
Latest: matheus372
Tip: Try sketching out ideas for overworlds and levels. Even if they don't manage to fit into Lunar Magic completely, at least you have a base to work from, instead of doing it all from scratch.Not logged in.
Details for Password System
UberASM Repository - Password System
File Name: Password System
Added:
Authors: Nowieso
Type: Level
Includes GFX: No
Includes Hijack: No
Featured: No
Description: With this code, you can easily create a unique password system for your level. Set 1-10 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
-Activate P-Switch
-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.
Tags: input, lorom, on off, p-switch, password, sa-1, sprite spawn, teleport
Rating: No rating
Download: Download - 4.11 KiB
66 downloads
Screenshots
Previous 
 Next
simon.caio
Great! thank you!
Posted by: simon.caio - | Link
KevinM
Tested with: LM 3.04, UberASMTool 1.4, SA-1 1.32, Snes9x 1.6. The code works well and it has a lot of interesting options, so accepted.
I found a couple of small issues that would be nice to fix in an update: when enabling the PSwitch option, the song doesn't change. Also, for the silver PSwitch, you need to add a "JSL $02B9BD" to turn all the on-screen sprites to silver coins.

Besides that, it would be nice to make an update to optimize the code (it's not a major issue, but it could also be a useful exercise for you :P). Right now you've encoded the different inputs with separate defines, so there's no room for expansion and there's a lot of duplicate code to check all the different inputs. A much compact (and faster, probably) way to do this could be to encode the inputs in a table (that could be expanded beyond 10 entries), so you wouldn't need to check !freeRAM for each possible value and jump to the different (but basically identical) subsections: you could just use the same code, pulling the correct value from the table using !freeRAM as the index.
Posted by:  KevinM - | Link

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2019 - SMW Central
Legal Information - Privacy Policy - Link To Us


Total queries: 7

Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • SMBX Community
  • ROMhacking.net
  • MFGG