Page 1 of 1

[LunaDLL] Switch Palace System.

Posted: Sun Oct 12, 2014 1:58 pm
by DarkShadeX
Valtteri told me to post LunaDLL stuff in the Graphics forum,So Yeah!
This tells you how to make a Switch Palace system using LunaDLL!

1.Make a txt file and call it lunaworld.
2.Add the following code to it:

Code: Select all

//Enable Disable Switch Blocks:
IfVar,0,0,1,1000,1,Yellow_True
IfVar,0,0,1,1001,1,Green_True
IfVar,0,0,1,1002,1,Red_True
IfVar,0,0,1,1003,1,Blue_True

#1000
//Enable the Yellow Switch Blocks!
TriggerSMBXEvent,0,0,0,0,1,Enable Yellow Blocks

#1001
//Enable the Green Switch Blocks!
TriggerSMBXEvent,0,0,0,0,1,Enable Green Blocks

#1002
//Enable the Red Switch Blocks!
TriggerSMBXEvent,0,0,0,0,1,Enable Red Blocks

#1003
//Enable the Blue Switch Blocks!
TriggerSMBXEvent,0,0,0,0,1,Enable Blue Blocks
3.It's highly recommended to make a Intro level for reseting the system!
In your Intro's level folder,make a lunadll.txt file and add the following code:

Code: Select all

#0
SetVar,0,0,0,0,1,Yellow_True
SetVar,0,0,0,0,1,Green_True
SetVar,0,0,0,0,1,Red_True
SetVar,0,0,0,0,1,Blue_True
BankVar,0,0,0,0,1,Yellow_True
BankVar,0,0,0,0,1,Green_True
BankVar,0,0,0,0,1,Red_True
BankVar,0,0,0,0,1,Blue_True
WriteBank,0,0,0,0,1,0
Were almost done!
4.Make a lunadll.txt file in the Switch Palace level folder and add the following code:

Code: Select all

#0
IfNPC,1,2,0,1005,0,once

#1005
PlaceSprite,1,2,0,0,0,0
LunaControl,2,1,0,0,0,0
SetVar,0,0,1,0,1,***_True
BankVar,0,0,0,0,1,***_True
WriteBank,0,0,0,0,1,0
#END
Change *** to either Yellow,Green,Blue or Red!
The above code Enables the Switch as soon as you kill the SMB3 Goomba.

5.In all your Levels that should contain Switch Blocks,make 2/4/6/8 Events.
Call the first one "Enable *** Blocks" and the second one "Disable *** Blocks"
Change *** to either Yellow,Green,Blue or Red!
The Enable event shows the Switch Blocks,and the disable one shows only the Disabled Switch Blocks.

And you are done!

Re: [LunaDLL] Switch Palace System.

Posted: Sun Oct 12, 2014 2:05 pm
by FanofSMBX
To reset the system, all you have to do is delete LunaSavedVars files.

Re: [LunaDLL] Switch Palace System.

Posted: Sun Oct 12, 2014 2:06 pm
by DarkShadeX
FanofSMBX wrote:To reset the system, all you have to do is delete LunaSavedVars files.
Still,i bet a lot of us here is to lazy to do that.
And it also would break stuff if you dont delete it when you restart it (because all switches would be activated from the start)

Re: [LunaDLL] Switch Palace System.

Posted: Sun Oct 12, 2014 2:08 pm
by FanofSMBX
I mean if you're deleting the .sav file it's not that much of a stretch to delete another file.

Re: [LunaDLL] Switch Palace System.

Posted: Sun Oct 12, 2014 2:09 pm
by DarkShadeX
FanofSMBX wrote:I mean if you're deleting the .sav file it's not that much of a stretch to delete another file.
Well,thats true too xP

Re: [LunaDLL] Switch Palace System.

Posted: Sun Oct 12, 2014 5:35 pm
by wrwgamer
This is awesome and if I were to actually make an episode
I would definitely try to incorporate this :D

Lunadll=amazing

Re: [LunaDLL] Switch Palace System.

Posted: Mon Oct 13, 2014 3:45 am
by leif_erikson
I have it so lunadll already detects when you delete your SMBX saves it deletes the corresponding lunadll save too, so I don't think you need to worry about resetting it though.

Re: [LunaDLL] Switch Palace System.

Posted: Mon Oct 13, 2014 9:55 am
by DaSpongeBobMan
How did you make this code?

Re: [LunaDLL] Switch Palace System.

Posted: Mon Oct 13, 2014 10:00 am
by DarkShadeX
DaSpongeBobMan wrote:How did you make this code?
With my brain.

Re: [LunaDLL] Switch Palace System.

Posted: Mon Oct 13, 2014 10:06 am
by DaSpongeBobMan
Wait, you typed a command for the Switch Palace thing?

Re: [LunaDLL] Switch Palace System.

Posted: Mon Oct 13, 2014 10:35 am
by Mr Boboo
Switch Palaces in LunaDLL?
Spoiler: show
Image
Ever since I played VI3 I've wanted to see legitimate Switch Palaces in SMBX, and my dreams have been realized. I'm definitely doing something with this.

Re: [LunaDLL] Switch Palace System.

Posted: Mon Oct 13, 2014 11:30 am
by FanofSMBX
DaSpongeBobMan wrote:Wait, you typed a command for the Switch Palace thing?
Yep. He learned how to do it from the lunadll tutorial files and he typed this up.

Re: [LunaDLL] Switch Palace System.

Posted: Mon Oct 13, 2014 1:26 pm
by DarkShadeX
If anyone has a problem with it or need help,simply ask me!

Re: [LunaDLL] Switch Palace System.

Posted: Tue Oct 14, 2014 9:29 am
by icez
this can defintly be used to make sercets and to change a way a game is progressed

Re: [LunaDLL] Switch Palace System.

Posted: Thu Oct 16, 2014 1:26 pm
by Yugioer
I don't understand step 5. How does lunadll know which event corresponds to which switch block color?

Re: [LunaDLL] Switch Palace System.

Posted: Thu Oct 16, 2014 1:53 pm
by FanofSMBX
Each switch block variable setter activates the event of those numbers if the variable is 1

Re: [LunaDLL] Switch Palace System.

Posted: Tue Oct 10, 2017 8:49 am
by TheOnlyKerbal
Which Number Corresponds To Each Colour Though?

Re: [LunaDLL] Switch Palace System.

Posted: Tue Oct 10, 2017 8:54 am
by PixelPest
TheOnlyKerbal wrote:Which Number Corresponds To Each Colour Though?
This system is extremely outdated and you probably shouldn't be using it. There's better ways to do so in SMBX2 and there will be switch palace NPCs soon as well