Search found 56 matches

Go to advanced search

by fern
Wed Feb 05, 2020 7:05 pm
Forum: LunaLua Help
Topic: Need help with lua? - LunaLua General Help
Replies: 247
Views: 33950

Re: Need help with lua? - LunaLua General Help

Is there something I'm missing here? Trying to play a sound file from an npc.lua file like this: SFX.play("sound/spike.wav") I've tried without specifying the file path, as well as moving the sound file out into the episode folder to no avail. The only way I can play sounds is by replacing them thro...
by fern
Sun Jan 13, 2019 4:32 am
Forum: LunaLua
Topic: Need help with lua? - LunaLua General Help
Replies: 1502
Views: 160853

Re: Need help with lua? - LunaLua General Help

Is there a way to bypass the NPC's speedX limit? I'm trying to make enemies hit bounce back. SpeedY works as intended but changing it's speedX simply reverses the NPC's direction as it continues to walk at the same speed.
by fern
Mon Jan 07, 2019 4:36 pm
Forum: LunaLua
Topic: Need help with lua? - LunaLua General Help
Replies: 1502
Views: 160853

Re: Need help with lua? - LunaLua General Help

What I do for stuff like this is make a table: (this goes outside functions) local blockSlopeTypes={} for k,v in ipairs({452,321,365,316,357,358,306,305,302,616,299,340,341,472,480,636,635,326,324,604,600,332}) do blockSlopeTypes[v]=1 end --bottom left to top right slope "/" for k,v in ipairs({451,...
by fern
Sun Jan 06, 2019 7:37 pm
Forum: LunaLua
Topic: Need help with lua? - LunaLua General Help
Replies: 1502
Views: 160853

Re: Need help with lua? - LunaLua General Help

It's not random, it looks like it returns the index of the slope block being stood on, but it's 0 if the player isn't on one. You should be able to get the block using local b=Block.get()[slopeblock] where slopeblock is the value at 0x48. Don't try to do it if that's 0, it's out of the index range ...
by fern
Sun Jan 06, 2019 6:25 pm
Forum: LunaLua
Topic: Need help with lua? - LunaLua General Help
Replies: 1502
Views: 160853

Re: Need help with lua? - LunaLua General Help

Is there a way to detect the type of slope under the player? The memory offset named "slope modifier" (0x48) seems to give random values.
by fern
Sat Mar 03, 2018 4:55 pm
Forum: LunaLua
Topic: hudoftime.lua with Toad
Replies: 0
Views: 597

hudoftime.lua with Toad

Is it possible to use hudoftime.lua with the other heart-based characters? When I try it with Toad, he goes down to one health when hit regardless of his hearts.
by fern
Thu Feb 22, 2018 9:08 pm
Forum: General
Topic: Tricks / Exploiting Physics
Replies: 3
Views: 667

Re: Tricks / Exploiting Physics

I messed around with it last night and found that spring jumps are actually extremely easy to pull off when running at full speed. And when I say extremely easy, I mean easy enough that you literally just run, jump, and throw the spring. I also found other fun spring tricks that are quite easy to pu...
by fern
Wed Feb 21, 2018 11:22 pm
Forum: General
Topic: Tricks / Exploiting Physics
Replies: 3
Views: 667

Tricks / Exploiting Physics

So I was wondering if tricks possible in SMB3 & SMW were possible to do in SMBX. Namely shell jumps and spring jumps, or any tricks that are unique to the engine. I accidentally found out P-Switch jumps are possible, but now I can't replicate it lol. Y'all got any tricks? For those who don't know wh...
by fern
Sun Jan 14, 2018 9:29 pm
Forum: Help and Support
Topic: How do you make a Super Mario Bros 1/Super Mario Bros 2 styled episode
Replies: 5
Views: 825

Re: How do you make a Super Mario Bros 1/Super Mario Bros 2 styled episode

By this I mean, how do you make an episode that has no world map and just dumps you into the next level as soon as you clear it? I already know you should select the "No World Map" and "Restart Last Level on Death" option, and I've set the Auto-Start Level to the first level out of 6, but after I c...
by fern
Wed Jan 10, 2018 2:46 pm
Forum: Help and Support
Topic: How do you make a Super Mario Bros 1/Super Mario Bros 2 styled episode
Replies: 5
Views: 825

Re: How do you make a Super Mario Bros 1/Super Mario Bros 2 styled episode

By this I mean, how do you make an episode that has no world map and just dumps you into the next level as soon as you clear it? I already know you should select the "No World Map" and "Restart Last Level on Death" option, and I've set the Auto-Start Level to the first level out of 6, but after I c...
by fern
Wed Jan 10, 2018 2:29 pm
Forum: LunaLua
Topic: bgofix.lua
Replies: 3
Views: 922

Re: bgofix.lua

Sambo wrote:The replacement to bgofix isn't publicly available yet, so you'll still have to use bgofix.

Are you trying to replace an existing animated BGO, or make a non-animated one become animated?
Trying to replace an existing animated BGO. SMB3 water to be precise.
by fern
Sat Dec 16, 2017 11:02 pm
Forum: LunaLua
Topic: bgofix.lua
Replies: 3
Views: 922

bgofix.lua

Hi, I'm trying to use bgofix.lua to put water in the foreground. The latest version said that it fixed a bug where animated BGOs displayed the entire image (all of the frames), instead of the animation; however, this is the exact problem I encountered. The wiki says that this API will be deprecated ...
by fern
Fri Dec 15, 2017 10:35 pm
Forum: Help and Support
Topic: NPC Config
Replies: 8
Views: 884

Re: NPC Config

Enjl wrote:Add frames=2 to the file. Then it'll work.
Thank you! It worked.
by fern
Fri Dec 15, 2017 3:25 pm
Forum: Help and Support
Topic: NPC Config
Replies: 8
Views: 884

Re: NPC Config

Enjl wrote:You don't need any of that lua code. Is the txt placed alongside the graphic in the same folder as lunadll.lua?
Yes, it's in the level folder along with the graphics and lunadll.lua.
by fern
Fri Dec 15, 2017 2:36 pm
Forum: Help and Support
Topic: NPC Config
Replies: 8
Views: 884

Re: NPC Config

If it doesn't work you're doing something else wrong. Also, the page EXPLAINS that crossed out text means that that particular field works for newly spawned npcs. Can you share exactly the process you're doing? Txt file, where it's placed, goomba custom graphic and lua code? The .txt file is a file...
by fern
Wed Dec 13, 2017 11:25 pm
Forum: Help and Support
Topic: NPC Config
Replies: 8
Views: 884

Re: NPC Config

NPC config does not need lunalua. https://www.supermariobrosx.org/forums/viewtopic.php?f=35&t=425 npcconfig.lua is used to obtain npc config variables in your scripts. They apply to all NPCs of an id and are accessed as such: npcconfig[id].field example: npcconfig[1].speed = 4 --sets goomba speed t...
by fern
Wed Dec 13, 2017 9:09 pm
Forum: Help and Support
Topic: NPC Config
Replies: 8
Views: 884

NPC Config

Do NPC.txt files work at all? Everytime I make one using the built-in thing in PGE it has no effect. I'm using NPCConfig.lua currently, but was wondering if this feature simply does not work. Also I'm trying to make Goombas face the way they're walking, which in the text file is edited by framestyle...
by fern
Tue Dec 12, 2017 10:07 pm
Forum: LunaLua
Topic: Data Class
Replies: 5
Views: 819

Re: Data Class

1) make a dummy API that just returns an empty table, load it shared (as API.load does by default if memory serves), and use it as a table or 2) use global variables, in a responsible fashion Hey, I have two questions about the data class: 1. Where is this data stored? Is it inside the actual save ...
by fern
Tue Dec 12, 2017 3:58 pm
Forum: LunaLua
Topic: Data Class
Replies: 5
Views: 819

Re: Data Class

1) make a dummy API that just returns an empty table, load it shared (as API.load does by default if memory serves), and use it as a table or 2) use global variables, in a responsible fashion Hey, I have two questions about the data class: 1. Where is this data stored? Is it inside the actual save ...
by fern
Tue Dec 12, 2017 2:22 am
Forum: LunaLua
Topic: Data Class
Replies: 5
Views: 819

Re: Data Class

1) make a dummy API that just returns an empty table, load it shared (as API.load does by default if memory serves), and use it as a table or 2) use global variables, in a responsible fashion Thanks! I'll try the first option tomorrow since I mostly get errors when I try messing with global variabl...

Go to advanced search