Language…
15 users online:  AmperSam, crocodileman94, CroNo, Dark Prince, Green, Green Jerry, JezJitzu, mtheordinarygamer, RPG Hacker, Rykon-V73, Skewer, SMW Magic,  Tahixham, W3aper, Zavok - Guests: 272 - Bots: 428
Users: 64,795 (2,373 active)
Latest user: mathew

P-Switch Thwomp activator

Not sure where to ask, but
Is it possible and or is there a patch that allows P-switch and blocks to be activated when a Thwomp falls on it?


To my knowledge there currently isn't an option for that interaction. However, if you know ASM, you could probably fairly easily recreate the behavior with either the disassembly or the block version, by just adding a bit of code for sprite interaction that checks whether the interacting sprite is a Thwomp.

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer
Don't want to be annoying but how exactly do I do it, like for the block version?
I found this for sprite interaction $019138
but not sure where to put it


You wouldn't call that routine, as that routine is meant to be called from the sprite's side. The Thwomp already calls that on its own, though, so you don't have to add that part.

Instead, inside the block, find the "Sprite" label; that label is run whenever a sprite is interacting with the block, with the index of that sprite in X. So you can check the sprite's ID in $9E for if it's a Thwomp, and, if so, call the block's routine for activating the switch (PSwitchMain). A code to do that would look like this:

Code
Sprite:
	if !SpritePassable
		LDY #$00
		LDA #$25
		STA $1693|!addr
	endif

	LDA !9E,x
	CMP #$26	; the ID of the Thwomp
	BEQ PSwitchMain
Return:
	RTL

That said, it is worth noting that though the Thwomp spans two tiles horizontally, it only by-default interacts with the tile on its left side. So make sure you put the P-Switch block there (or use this patch to fix it).

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer
Yo thanks Thomas if I come across any bugs I'll let you guys know.