Page 1 of 1

[NPC Pack] Silver P-Switch

Posted: Mon May 04, 2020 6:15 pm
by WhimWidget
It's the Silver P-Switch from SMW!

Wait...SMBX doesn't have munchers...
That's fine! It uses a the drill spikes (Block 511) intead, and can be configured to affect any block of your choice.

https://www.dropbox.com/s/nieb43a3jm1u8 ... k.zip?dl=0

ImageImage

ImageImage


Current issues to be potentially changed:
-Change formula for stacking Silver-P-Switches
-Find an alternative to using "Auido" to prevent bugs with other lua code that uses "Audio"

Re: [NPC Pack] Silver P-Switch

Posted: Mon May 04, 2020 6:59 pm
by Lusho
Well SMBX has muchers as block 109, and enjls munchers, but those are custom npcs so i guess they dont count

Re: [NPC Pack] Silver P-Switch

Posted: Mon May 04, 2020 7:42 pm
by WhimWidget
Oh yeah. NPC 109 totally has been officially updated. Added those to the list (so 109 and 511 count as munchers at base).
Also updated the Readme to actually state how to add affected/non-affecte NPCs correctly.
Also made one efficiency fix, and made it so this works with layers.

Re: [NPC Pack] Silver P-Switch

Posted: Tue May 05, 2020 1:10 am
by Emral
Ohh, awesome!
Quick things I noticed in the code:
You can use npc:transform(id) to transform an npc while already adjusting for size differences. Check classexpander.lua for more info.
In SMW, the coin's speedY value stacks additively (maxed to 0 first), as demonstrated in this level: https://youtu.be/S0Y2xW-14mg?t=44
It looks like the yellow coins spawned from blocks are off-center.

Re: [NPC Pack] Silver P-Switch

Posted: Tue May 05, 2020 3:16 am
by Akromaly
This looks like a very cool way to set up some bonuses! Nice job!