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
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
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
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!