LunaDLL idea

General discussion about Super Mario Bros. X.

Moderator: Userbase Moderators

MistakesWereMade
Torpedo Ted
Torpedo Ted
Posts: 1646
Joined: Tue Dec 31, 2013 4:13 pm

LunaDLL idea

Postby MistakesWereMade » Tue Aug 12, 2014 8:33 pm

Is it possible to make something that basically "activates a switch" when you press a certain button?

For example, if you press something like alt run, the blue switch will activate and the red switch will deactivate, kind of like how shaking the wiimote moved the platforms in one stage in mario galaxy

zioy
Reznor
Reznor
Posts: 2760
Joined: Thu Jul 17, 2014 4:47 pm
Pronouns: he/him
Contact:

Re: LunaDLL idea

Postby zioy » Tue Aug 12, 2014 8:35 pm

That would be brilliant! I just don't have any idea of how to do it.

leif_erikson
Blooper
Blooper
Posts: 167
Joined: Thu Feb 06, 2014 12:23 pm

Re: LunaDLL idea

Postby leif_erikson » Tue Aug 12, 2014 9:58 pm

Unfortunately SMBX doesn't keep track of what switch is pressed. It just switches all the blocks from on/off or /off/on each time you press it. But you can make lunadll detect when you press altjump, and you can tell it to swap all blocks in the level with another type of block.

Code: Select all

#-1
SetVar,0,0,0,0,1,SJPressed

#0
OnPlayerMem,0xFC,0xFFFF,0,2000,0,0
OnPlayerMem,0xFC,0,0,2001,0,0

#2000
IfVar,0,0,0,2002,1,SJPressed

#2001
SetVar,0,0,0,0,1,SJPressed

#2002
SetVar,0,0,1,0,1,SJPressed
SwapAllBlocks,1,3,0,0,1,0

#END
This code swaps all blocks of blockID 1 (square wood block) to have block ID 3 (wood flat floor block) and vice versa. If you want to use different block types, change the 1 and the 3 next to SwapAllBlocks to the blocks you want.

You will need the latest version of lunadll by the way because block swap is a new command http://www.gamearchaeology.com/LunaDll.dll

FanofSMBX
Ludwig von Koopa
Ludwig von Koopa
Posts: 3878
Joined: Sun Dec 22, 2013 12:01 pm

Re: LunaDLL idea

Postby FanofSMBX » Tue Aug 12, 2014 10:06 pm

You could make the empty blue ones turn to full blue ones and the full red ones turn to empty red ones for example.

leif_erikson
Blooper
Blooper
Posts: 167
Joined: Thu Feb 06, 2014 12:23 pm

Re: LunaDLL idea

Postby leif_erikson » Tue Aug 12, 2014 10:14 pm

yes you should probably do that but I'm too lazy to look up the block IDs. Go to the graphics folder for blocks to find them


Return to “General”

Who is online

Users browsing this forum: Ahrefs [Bot] and 3 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari