Yes but is that even necessary? Unless you really don't want them to buy multiple items for some reason, they can buy as many items as they want until they run out coins, and then the transaction won't work.TiKi wrote:I guess I can use custom cheats, but I don't know how to make it only avaliable once per level visit. Is that what Delete Events From is for?
LunaDLL/LunaLUA help thread
Re: LunaDLL help thread
DON'T PM me. Ask your question in the help thread so everyone can be answered.
Re: LunaDLL help thread
Is there a way to make it so the player cannot dismount no matter what?
A very shy ghost.
-
- ? Title Title Title Title ?
- Posts: 30
- Joined: 14 years ago
- Location: USA
Re: LunaDLL help thread
Disable spin-jump.Ittababy wrote:Is there a way to make it so the player cannot dismount no matter what?
That Luna-code to do that can be found over in the Superb Demo Sisters collab.
Re: LunaDLL help thread
That actually works? Never tried it myself.
DON'T PM me. Ask your question in the help thread so everyone can be answered.
Re: LunaDLL help thread
Tried that, no luck. Demo just hops off catnip without spinning. :/KingTwelveSixteen wrote:Disable spin-jump.Ittababy wrote:Is there a way to make it so the player cannot dismount no matter what?
That Luna-code to do that can be found over in the Superb Demo Sisters collab.
Is there a way to just disable that button entirely?
A very shy ghost.
-
- Posts: 0
- Joined: 9 years ago
Re: LunaDLL help thread
Kil could you help me a bit?
I want the 3 Section of my castle to be a autoscroll section,i got the scrolling to work but the screen
still moves like normal when i walk to the right... How can i stop that?
EDIT:
This is my code:
http://pastebin.com/PHBxTikK
I want the 3 Section of my castle to be a autoscroll section,i got the scrolling to work but the screen
still moves like normal when i walk to the right... How can i stop that?
EDIT:
This is my code:
http://pastebin.com/PHBxTikK
Re: LunaDLL help thread
I fixed this btwDarkchaox100 wrote:Kil could you help me a bit?
I want the 3 Section of my castle to be a autoscroll section,i got the scrolling to work but the screen
still moves like normal when i walk to the right... How can i stop that?
EDIT:
This is my code:
http://pastebin.com/PHBxTikK
Re: LunaDLL help thread
http://speedy.sh/Q6rBp/Yoshi-Castle.zip
Okay in section 8 we have MC Ballyhoo's (and his talking hat Big Top who is currently a Paragoomba lol) shop. The way I'm doing powerups is it shows and hides a generator for a split second. What I'm looking for is:
Typing "mushroom" triggers the SMBX event "MushroomOn" (sorry I forgot to add events in the level before I sent it) and subtracts 3 RaoCoins
Typing "flower" triggers "FlowerOn" and subtracts 6 coins
Typing "bigtop" triggers "MinigameDoorShow".
The first two can be done multiple times fine because of the generators. But the minigames would require a whole bunch of work to reset after you win them so what I was thinking was you could only do them once a level. Would it be possible to make the 1up in the shop that you get to after you win hide the door, or would this be overrode by the bigtop cheat's TriggerSMBXEvent? That triggers only once right?
PS Also you don't *have* to do this, but I'd appreciate it if you could use IfNPC to disable the first two passwords from working if npc-9 or npc-14 (respectively) exist in the room. If you get two powerups that are on top of each other, SMBX is iffy about making both count instead of just one.
PPS the reason I'm using generators instead of form-setting is so one can top up the third heart with a mushroom if they buy a flower.
Okay in section 8 we have MC Ballyhoo's (and his talking hat Big Top who is currently a Paragoomba lol) shop. The way I'm doing powerups is it shows and hides a generator for a split second. What I'm looking for is:
Typing "mushroom" triggers the SMBX event "MushroomOn" (sorry I forgot to add events in the level before I sent it) and subtracts 3 RaoCoins
Typing "flower" triggers "FlowerOn" and subtracts 6 coins
Typing "bigtop" triggers "MinigameDoorShow".
The first two can be done multiple times fine because of the generators. But the minigames would require a whole bunch of work to reset after you win them so what I was thinking was you could only do them once a level. Would it be possible to make the 1up in the shop that you get to after you win hide the door, or would this be overrode by the bigtop cheat's TriggerSMBXEvent? That triggers only once right?
PS Also you don't *have* to do this, but I'd appreciate it if you could use IfNPC to disable the first two passwords from working if npc-9 or npc-14 (respectively) exist in the room. If you get two powerups that are on top of each other, SMBX is iffy about making both count instead of just one.
PPS the reason I'm using generators instead of form-setting is so one can top up the third heart with a mushroom if they buy a flower.
Re: LunaDLL help thread
What you sent doesn't contain the lua dragon coin system, so how is that going work?
Anyway
Anyway
Code: Select all
#0
// Here's 10 dragon coins since you forgot to add the dragon coin thing. Delete this later
SetVar,0,0,10,0,1,RaoCoins
$RaoCoins,ShowVar,0,100,225,4,0,Coins =
// Section 8 codes
#8
OnCustomCheat,0,0,0,2000,0,mushroom
OnCustomCheat,0,0,0,2002,0,flower
OnCustomCheat,0,0,0,2005,0,bigtop
// If coins greater than 2...
#2000
IfVar,0,1,2,2001,1,RaoCoins
#2001
SetVar,0,2,3,0,1,RaoCoins
TriggerSMBXEvent,0,0,0,0,1,MushroomOn
// If coins greater than 5...
#2002
IfVar,0,1,5,2003,1,RaoCoins
#2003
SetVar,0,2,6,0,1,RaoCoins
TriggerSMBXEvent,0,0,0,0,1,FlowerOn
// If coins greater than 9...
#2005
IfVar,0,1,9,2006,1,RaoCoins
#2006
SetVar,0,2,10,0,1,RaoCoins
TriggerSMBXEvent,0,0,0,0,1,MinigameDoorShow
DON'T PM me. Ask your question in the help thread so everyone can be answered.
Re: LunaDLL help thread
Thanks a ton
Hoeloe: your RaoCoins system levels call "load image a nil value" on level load, and afte you quit testing a level it crashes. The RaoCoins counter also isn't visible for me so I bet there's a problem there. Do I need to download Lua Luna as well or are the necessary files included?
Hoeloe: your RaoCoins system levels call "load image a nil value" on level load, and afte you quit testing a level it crashes. The RaoCoins counter also isn't visible for me so I bet there's a problem there. Do I need to download Lua Luna as well or are the necessary files included?
Re: LunaDLL help thread
LunaLua will be necessary. The raocoin system I posted just as code does have some bugs (and will try loading a nil value on level load, unfortunately), but the example download should have that fixed. LunaLua wasn't included in the download, though.TiKi wrote:Thanks a ton
Hoeloe: your RaoCoins system levels call "load image a nil value" on level load, and afte you quit testing a level it crashes. The RaoCoins counter also isn't visible for me so I bet there's a problem there. Do I need to download Lua Luna as well or are the necessary files included?
Re: LunaDLL help thread
Hey Kil: could you please make the minigame event trigger a DeleteEventsFrom (so after calling that event once it deletes itself)?
- Oddwrath
- The ghost of talkhaus unlikely
- Posts: 110
- Joined: 9 years ago
- Pronouns: she/her
- Location: Merry Old Europe
Re: LunaDLL help thread
I decide to try LunaLua again and I've hit a block, again.
The idea is that when the player enters the trigger box, they begin to choke/suffocate/freeze to death/whatever. If they don't get out in 5 seconds, they're pretty much boned, since the area won't stop dealing damage, until they're dead. The problems are:
1) The timer is displayed in a really ugly way(screenshot) and I don't know how to change it(unless there is some way to turn T/60 into an int)
2)I'm trying to find a way to stop the timer once it reaches 0.
Is there any way to do that in LunaLua?
Edit: Also, I have no idea how does playSFX([string] soundfile) works since it doesn't accept anything I give it.
Code: Select all
T = 300
function onLoop()
printText("Time ",650,30)
printText(tostring(T/60),650,50)
if (player.x>-199580 and player.y>-200150 and player.x<-199430 and player.y<-200070)then
T = T - 1
if (T =< 0) then
player:harm()
end
else
T =300
end
end
1) The timer is displayed in a really ugly way(screenshot) and I don't know how to change it(unless there is some way to turn T/60 into an int)
2)I'm trying to find a way to stop the timer once it reaches 0.
Is there any way to do that in LunaLua?
Edit: Also, I have no idea how does playSFX([string] soundfile) works since it doesn't accept anything I give it.
- Attachments
-
- screen16.png (13.78 KiB) Viewed 4934 times
my avatar is from that obake game made in 2001 that you cannot play anymore unless you run it through a virtual machine and apply a locale patch
Re: LunaDLL help thread
For 2, can't you just set T to = 0 after the player harm?
DON'T PM me. Ask your question in the help thread so everyone can be answered.
-
- Posts: 0
- Joined: 9 years ago
Re: LunaDLL help thread
Hey Kil,would it be possible to edit the SMBX exe so it immediately starts the main game and not show the Launcher?
Re: LunaDLL help thread
sure
DON'T PM me. Ask your question in the help thread so everyone can be answered.
-
- Posts: 0
- Joined: 9 years ago
Re: LunaDLL help thread
Could you maybe do that with my SMBX exe if you don't mind?Kil wrote:sure
Re: LunaDLL help thread
Nah, that could take many hours
DON'T PM me. Ask your question in the help thread so everyone can be answered.
Re: LunaDLL help thread
You can turn t/60 into an int with a rounding function.Oddwrath wrote:I decide to try LunaLua again and I've hit a block, again.
math.ceil(number) will round up, while math.floor(number) will round down. I think these functions are available in LunaLua.
For 2, add an extra condition: if(T > 0)
-
- Posts: 0
- Joined: 9 years ago
Re: LunaDLL help thread
Aww...
Well thats alright.
(I just asked btw,because i made my own launcher.)
Well thats alright.
(I just asked btw,because i made my own launcher.)
Re: LunaDLL help thread
Agreed for *my* game tooDarkchaox100 wrote:Aww...
Well thats alright.
(I just asked btw,because i made my own launcher.)
I guess you have to manually go in each exe and get the triggers for the main game menu?
Hey guys who's up for a "pay Kil" kickstarter for Yoshi's Island X?
Re: LunaDLL help thread
You guys could just use any of the many freely available 2d engines you know. Not sure why everyone's so attached to SMBX when it's a huge pain in the ass.
DON'T PM me. Ask your question in the help thread so everyone can be answered.
- Oddwrath
- The ghost of talkhaus unlikely
- Posts: 110
- Joined: 9 years ago
- Pronouns: she/her
- Location: Merry Old Europe
Re: LunaDLL help thread
Kil wrote:For 2, can't you just set T to = 0 after the player harm?
Yup, worked like a charm. Thanks.Hoeloe wrote: You can turn t/60 into an int with a rounding function.
math.ceil(number) will round up, while math.floor(number) will round down. I think these functions are available in LunaLua.
For 2, add an extra condition: if(T > 0)
Also, I think we should do just a general LunaDLL to LunaLua conversion guide for everyone.
Also also, LunaLua still breaks the democounter. Just a reminder.
my avatar is from that obake game made in 2001 that you cannot play anymore unless you run it through a virtual machine and apply a locale patch
Re: LunaDLL help thread
Is there a way to find out the sprite ID of the item you're holding, by printing it to the screen or something? Every time I add a new NPC it seems like the key changes IDs and the phanto stops working.
Re: LunaDLL help thread
I dunno what's going on with the keys. Maybe they get a semi-random ID for some reason, but then I have no idea how the game decides it's a key and not some other ID. I think thi'll print the ID of what demo's holding
Code: Select all
function onLoop()
thenpc = npcs()[player:mem(0x154, FIELD_WORD)]
printText(tostring(thenpc.id), 270, 250)
end
DON'T PM me. Ask your question in the help thread so everyone can be answered.