Language…
6 users online: dotCoockie, fanfan21, Ice Man, Jamie, neidoodle, Rykon-V73 - Guests: 114 - Bots: 118
Users: 70,118 (2,533 active)
Latest user: efilyarps

Make Switch Palace Switch activate all Switches

Hi there!

What would be the best way to make 1 switch palace activate all four upon hitting the switch? (Yellow, Green, Red, & Blue)
Do you still want to have the single four switches as objects separately from the all-in-one switch?

If so, that's definitely possible (I'm thinking make it flag based i.e. any switch object becomes a all-in-one switch if it's in a specific translevel) but it's the harder thing to do so I'll ask before doing it.

If you're fine with only having the all-in-one switch, here's a quick patch that makes any of the switches activate every one of them:

Code
!addr = $0000

if read1($00FFD5) == $23
	sa1rom
	!addr = $6000

org $00EEAA
	LDX #$03
-	LDA #$01				
	STA $1F27|!addr,x
	DEX
	BPL -
	LDX #$00	;color of the pressed switch sprite (0 = g, 1 = y, 2 = b, 3 = r)
	NOP

#thp{O_O2} DIDN'T TEST #thp{O_O2} BACK UP YOUR ROM FIRST #thp{O_O2}
e: added SA-1 blabber
Originally posted by Koopster
Do you still want to have the single four switches as objects separately from the all-in-one switch?

If so, that's definitely possible (I'm thinking make it flag based i.e. any switch object becomes a all-in-one switch if it's in a specific translevel) but it's the harder thing to do so I'll ask before doing it.

If you're fine with only having the all-in-one switch, here's a quick patch that makes any of the switches activate every one of them:

Code
!addr = $0000

if read1($00FFD5) == $23
	sa1rom
	!addr = $6000

org $00EEAA
	LDX #$03
-	LDA #$01				
	STA $1F27|!addr,x
	DEX
	BPL -
	LDX #$00	;color of the pressed switch sprite (0 = g, 1 = y, 2 = b, 3 = r)
	NOP

#thp{O_O2} DIDN'T TEST #thp{O_O2} BACK UP YOUR ROM FIRST #thp{O_O2}
e: added SA-1 blabber
\
This is exactly what I was looking for. No errors so far in testing. Thanks for your help!!