Banner
Views: 924,125,897
Time:
29 users online: ageVerrly,  Ayami, BabaYegha, chickaDEE Magazine, Daizo Dee Von,  DeppySlide, Diego, Dippy, ditschi, E-man38, FrozenHydra, Green Jerry, HammerBrother, KevinM,  LMNtals, Magmatic, MassPunishment, mateochips, MiracleWater, Miscalc, Pancake001, qantuum, Revenge319, Runic_Rain, Segment1Zone2, snomangaming, TheJank, underway, WhiteYoshiEgg - Guests: 58 - Bots: 88 Users: 51,681 (2,051 active)
Latest: Ollati12
Tip: Avoid making large, flat, boring stretches of land. Vary up the architecture and spritework in your levels.
Not logged in.
Turning on a block from above?
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - Turning on a block from above?
Pages: « 1 » Link


Is there any way to active a block from above (as in, turning a switch on/off) without it spamming every frame?

Like, normally, if you set up an on/off switch to activate from above, walking over it would make it turn on and off every frame, until you get off.

However, I want it to change state, and then stay in that state, and when you get off the switch you can walk back on to turn change it back. Is there any way to do this? I've already tried doing this in LevelASM, it makes the switch never change.

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer
Yes, i did so before and was easy actually. here was the code i used for it
Code
db $42

JMP Return : JMP Mario : JMP Return : JMP Return : JMP Return : JMP Return : JMP Return
JMP Off : JMP Return : JMP Return

!Freeram = $13D8	; Random Freeram Address

Mario:
	LDA $16
	BMI Off
	LDA !Freeram
	BNE Return

	; Change switch from on/off code here

	INC !Freeram
Return:
	RTL

Off:
	STZ !Freeram
	RTL
I change my layout every 4-5 months


Well, for the most part, you code works, but it doesn't seem to work so well with walking on and off the switch, rather with only jumping onto it. Do you know any way to do that as well?

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer
Pages: « 1 » Link
Forum Index - SMW Hacking - SMW Hacking Help - ASM & Related Topics - Turning on a block from above?

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

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


Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Super Mario Bros. X Community
  • ROMhacking.net
  • Mario Fan Games Galaxy
  • sm64romhacks