Page 1 of 1

LunaDLL Function Examples

Posted: Mon Mar 17, 2014 1:56 pm
by DarkShadeX
This may help people making some stuff in their levels :3
Spoiler: show
///Deactivate Spin Jump:
#0
PlayerMemSet,0,0x120,0,0,0,w


///Deactivate Flying (Only Gliding is possible (similar to Super Mario 3D World))
#0
PlayerMemSet,0,0x16C,0,0,0,w
PlayerMemSet,0,0x16E,0,0,0,w

///Deactivates Cheating in levels:
#0
ClearInputString,0,0,0,0,0,0

///Change the Section Music:
PlayMusic,0,Section with a new custom music (needs to be an unused section),0,0,Delay (set it to 50/60 or 100 to prevent the game to freeze for a Second...),0

///Disable/Remove all mounts,yoshis or shoes when the level is loading:
#-1
FilterMount,0,0,0,0,0,0

///Change the Player:
FilterPlayer,0,Current Character ID,New Character ID,0,0,0

^^ As a little help for you:
ID - Character
0 = Noone (Should not be used)
1 = Mario
2 = Luigi
3 = Princess Peach
4 = Toad
5 = Link

///Draw a text/string on the screen:
#0
ShowText,0,X Position,Y Position,Font(1,2,3 (Use 3 for Best Result)),0,TEXT! (ALWAYS ENABLE CAPS FOR THIS!)

///Trigger an SMBX Event:
#1
TriggerSMBXEvent,0,0,0,0,1,EVENT NAME!

///Give the player more lives:
MemAssign,0x00B2C5AC,Ammount of lives that you want to add,1

///Add a custom cheat to the level:
#0
//This will activate a lunadll event of your choice when you type in the cheat:
OnCustomCheat,0,0,0,#EVENT-NUMBER,0,cheatname

" example:

#0
OnCustomCheat,0,0,0,2000,0,ineedafewlifes

//Give the Player 6 extra lifes:
#2000
MemAssign,0x00B2C5AC,6,1 " (Remove the "")

///Disable Tail Swipe:
#0
PlayerMemSet,0,0x164,0xFFFF,0,0,w
If you need help with a function or even a example then Simply ask here ; )

(Will be Updated soon with a few more examples)

Re: LunaDLL Function Examples

Posted: Mon Mar 17, 2014 2:52 pm
by FanofSMBX
Could you please make a function to disable tail spin and flying, similar to Bunny Carrot?

Re: LunaDLL Function Examples

Posted: Mon Mar 17, 2014 3:25 pm
by DarkShadeX
There is already an No Flying code in the spoiler...
Anyways:
Heres the TAIL SPIN code:

Code: Select all

PlayerMemSet,0,0x164,0xFFFF,0,0,w

Re: LunaDLL Function Examples

Posted: Mon Mar 17, 2014 6:59 pm
by icez
I am trying to hit modifier to work for the bosses I managed to get the script working where the mother brain already has 9 hits already inflicted on it. The problem I am having is trying to change it to something like 8 or 12 or something like that every time I experiment around with it, it ether stays at 10 or the npc has a infinite number of hits.if you know what I have to do that would be great if you could let me know.

Re: LunaDLL Function Examples

Posted: Mon Mar 17, 2014 7:07 pm
by meowflash
Make a function that gives the Goomba more health!

Re: LunaDLL Function Examples

Posted: Mon Mar 17, 2014 7:18 pm
by FanofSMBX
Could you please make a fixed multiple checkpoints?

Re: LunaDLL Function Examples

Posted: Mon Mar 17, 2014 7:58 pm
by Fuyu
The text one could be useful if you want to introduce your bosses' names on a LoZ like style, nice, really nice of you to bring this to us.

Re: LunaDLL Function Examples

Posted: Mon Mar 17, 2014 10:57 pm
by MECHDRAGON777
could you make it so cheats are unlock-able and you can only use a cheat so many times in a level? Also, could you make a video on how to do these things! Thank you if you can! The Creat a cheat would be nice and cheat dis abler is also good! Forcing a character on level start is very good! With a video, I see this as very useful!

Re: LunaDLL Function Examples

Posted: Tue Mar 18, 2014 2:43 pm
by Void
Maybe A Health Meter For A Certain Npc? That Would Be Cool!

Re: LunaDLL Function Examples

Posted: Tue Mar 18, 2014 2:47 pm
by zlaker
That's not possible. Sorry

Re: LunaDLL Function Examples

Posted: Tue Mar 18, 2014 5:51 pm
by MECHDRAGON777
zlakerboy357 wrote:That's not possible. Sorry
What is not possible? I guess Functioning Star/Moon coins is also impossible?

Re: LunaDLL Function Examples

Posted: Tue Mar 18, 2014 8:04 pm
by leif_erikson
I dunno what those are. Anyway, you can't make custom sprites unless you program them in C and compile custom versions of lunadll.

Re: LunaDLL Function Examples

Posted: Sun Mar 23, 2014 11:32 pm
by MECHDRAGON777
Darkchaox100 wrote:
///Add a custom cheat to the level:
#0
//This will activate a lunadll event of your choice when you type in the cheat:
OnCustomCheat,0,0,0,#EVENT-NUMBER,0,cheatname

" example:

#0
OnCustomCheat,0,0,0,2000,0,ineedafewlifes

//Give the Player 6 extra lifes:
#2000
MemAssign,0x00B2C5AC,6,1 " (Remove the "")
Can you show a cheat where it takes you to the World map when entered?

Re: LunaDLL Function Examples

Posted: Mon Mar 24, 2014 8:55 pm
by Imaynotbehere4long
beanluv wrote:Maybe A Health Meter For A Certain Npc? That Would Be Cool!
If you're talking about having a health bar for layer-based bosses, that can be done without LunaDLL. If you're talking about individual NPCs that take multiple hits to kill, there should be a code that displays how many hits they have left before being killed, but it's numeric, not in meter form.

Re: LunaDLL Function Examples

Posted: Sat Mar 29, 2014 12:37 pm
by Void
Yeah, I'm Talking About The Boss Health, I'm Trying To Change Mother Brain's Boss HP From 10 To 8 Just Like The Classic Sonic Bosses. Could anybody Help Me?