[NPC Pack] Silver P-Switch

Share and discuss custom LunaLua code and content packs for SMBX2.

Moderator: Userbase Moderators

WhimWidget
Cheep-Cheep
Cheep-Cheep
Posts: 14
Joined: Sun Jun 02, 2019 7:52 pm

[NPC Pack] Silver P-Switch

Postby WhimWidget » Mon May 04, 2020 6:15 pm

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"
Last edited by WhimWidget on Sun Jun 28, 2020 7:13 pm, edited 1 time in total.

Lusho
Blooper
Blooper
Posts: 163
Joined: Wed Dec 25, 2019 11:39 pm
Flair: Intention is what matters
Pronouns: he/him

Re: [NPC Pack] Silver P-Switch

Postby Lusho » Mon May 04, 2020 6:59 pm

Well SMBX has muchers as block 109, and enjls munchers, but those are custom npcs so i guess they dont count

WhimWidget
Cheep-Cheep
Cheep-Cheep
Posts: 14
Joined: Sun Jun 02, 2019 7:52 pm

Re: [NPC Pack] Silver P-Switch

Postby WhimWidget » Mon May 04, 2020 7:42 pm

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.

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9865
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: [NPC Pack] Silver P-Switch

Postby Emral » Tue May 05, 2020 1:10 am

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.
Last edited by Emral on Tue May 05, 2020 3:30 am, edited 1 time in total.

Akromaly
Bronze Yoshi Egg
Bronze Yoshi Egg
Posts: 428
Joined: Sun Mar 12, 2017 8:07 am
Flair: anemoia
Contact:

Re: [NPC Pack] Silver P-Switch

Postby Akromaly » Tue May 05, 2020 3:16 am

This looks like a very cool way to set up some bonuses! Nice job!


Return to “LunaLua”

Who is online

Users browsing this forum: Alexx0612, arthur4272, Petal [Bot] and 1 guest

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari