General Help and Quick Questions

Need help with any SMBX game-related issues? Ask your questions here.
User avatar
Wiimeiser
Snifit
Snifit
Posts: 205
Joined: Mon Jun 24, 2019 4:36 am
Flair: What?

Re: General Help and Quick Questions

Postby Wiimeiser » Wed Aug 11, 2021 4:54 am

I have no idea what's going on with the Celeste Screen Transitions (rooms.lua), but it's doing something weird with this particular line of code:

Code: Select all

    if data.timer >= 32 then
It makes data.timer register as a nil.

It also breaks this:

Code: Select all

			color = Color.yellow..v.data.redfx
Causing an error saying "concat must be color or number"

So based on this, it seems to be overwriting key variables in an unsafe way and turning them into null variable types.

Also, I must be the only person who reads this thread anymore...

User avatar
MrDoubleA
Posts: 316
Joined: Mon Aug 20, 2018 7:02 am
Pronouns: he/him
Contact:

Re: General Help and Quick Questions

Postby MrDoubleA » Thu Aug 19, 2021 8:57 pm

Wiimeiser wrote:
Wed Aug 11, 2021 4:54 am
I have no idea what's going on with the Celeste Screen Transitions (rooms.lua), but it's doing something weird with this particular line of code:

Code: Select all

    if data.timer >= 32 then
It makes data.timer register as a nil.

It also breaks this:

Code: Select all

			color = Color.yellow..v.data.redfx
Causing an error saying "concat must be color or number"

So based on this, it seems to be overwriting key variables in an unsafe way and turning them into null variable types.

Also, I must be the only person who reads this thread anymore...
Sounds like your code doesn't handle the case where its onDrawNPC function runs before it's onTickNPC. This is not a rooms.lua issue.
Hi. I make some stuff.
(MrDoubleA#3124 on Discord)

MrDoubleA's NPC Pack
rooms.lua - Quick respawn & Celeste-styled rooms
Extended Koopas

Image

More stuff: show
Shiny Medals ooo:

Image
Image
Image
Image
Image

I support:
Image
Image

FireSire337
Goomba
Goomba
Posts: 1
Joined: Sat Sep 04, 2021 12:33 pm
Pronouns: he/him

Re: General Help and Quick Questions

Postby FireSire337 » Sat Sep 04, 2021 12:43 pm

Does anybody know how to disable character swapping in the world map menu?

User avatar
1Mariobro
Goomba
Goomba
Posts: 4
Joined: Fri Mar 05, 2021 11:30 pm
Pronouns: He/Him

Re: General Help and Quick Questions

Postby 1Mariobro » Wed Nov 03, 2021 8:11 pm

I'm making a cutscene that has the player auto move but I want it to stop at a certain place how do I do that?
Image

User avatar
Weirdgoomba4932
Bit
Bit
Posts: 66
Joined: Fri Jun 18, 2021 4:36 pm
Flair: Not active 08/01 - 25/01
Pronouns: He/him

Re: General Help and Quick Questions

Postby Weirdgoomba4932 » Fri Nov 05, 2021 1:42 pm

1Mariobro wrote:
Wed Nov 03, 2021 8:11 pm
I'm making a cutscene that has the player auto move but I want it to stop at a certain place how do I do that?
If you're using events for the auto-move so you need to make an event where the up control is enabled and the character will stop walking.
Image
If you feel stupid, remember I lost in my own levels.

User avatar
1Mariobro
Goomba
Goomba
Posts: 4
Joined: Fri Mar 05, 2021 11:30 pm
Pronouns: He/Him

Re: General Help and Quick Questions

Postby 1Mariobro » Fri Nov 05, 2021 8:49 pm

Weirdgoomba4932 wrote:
Fri Nov 05, 2021 1:42 pm
1Mariobro wrote:
Wed Nov 03, 2021 8:11 pm
I'm making a cutscene that has the player auto move but I want it to stop at a certain place how do I do that?
If you're using events for the auto-move so you need to make an event where the up control is enabled and the character will stop walking.
Thank you!
Image

BeancityDaPerson
Goomba
Goomba
Posts: 1
Joined: Sat Nov 27, 2021 12:04 pm
Pronouns: He/Him and They/Them

Re: General Help and Quick Questions

Postby BeancityDaPerson » Sat Nov 27, 2021 12:49 pm

For some reason when I load up SMBX2, the window seems to be vertically and horizontally flipped and it thinks the mouse is in the opposite place compared to where it actually is.
Image

User avatar
Weirdgoomba4932
Bit
Bit
Posts: 66
Joined: Fri Jun 18, 2021 4:36 pm
Flair: Not active 08/01 - 25/01
Pronouns: He/him

Re: General Help and Quick Questions

Postby Weirdgoomba4932 » Mon Nov 29, 2021 9:57 am

How I can change the health of a npc and make them resist more hits?
Image
If you feel stupid, remember I lost in my own levels.

User avatar
Wohlstand
Charged Spiny
Charged Spiny
Posts: 1910
Joined: Tue Feb 11, 2014 4:44 pm
Flair: 狐エンジニア
Pronouns: he/him
Contact:

Re: General Help and Quick Questions

Postby Wohlstand » Fri Jan 14, 2022 3:41 am

BeancityDaPerson wrote:
Sat Nov 27, 2021 12:49 pm
For some reason when I load up SMBX2, the window seems to be vertically and horizontally flipped and it thinks the mouse is in the opposite place compared to where it actually is.
Image
Is that under VirtualBox VM, or do you run the thing on hardware?
This mess also affects the game too, blame glOrtho() call usage. Usually, it's totally not suggested to use it at all, instead, compute the screen-scene mapping manually.
SMBX for Android, Moondust Project, my Media and supported projects: show
Support me on the Patreon
Image

TheXTech - modern port of SMBX, also for Android
SMBX on TheXTech Topic

Moondust Project (aka PGE)
Moondust Project SMBX Topic

I'm support:
Lowser's Conquest by Sednaiur

Image
P.S. I don't like huge signatures which would be annoying, therefore I put huge content into spoilers

Shrek128
Goomba
Goomba
Posts: 3
Joined: Thu Jan 20, 2022 5:56 am
Pronouns: him

Re: General Help and Quick Questions

Postby Shrek128 » Fri Jan 21, 2022 3:08 am

I am a beginner on SMBX2, and I would like to have some questions that I can't find the answer. :oops:

-How do you put a waterfall in the world map? I can't find it.

-What is the difference between "Custom" and "Reserved"?

-How do I use NPC packs or texture packs (after downloading)?

Thanks in advance for your answers. :D

User avatar
deice
Dolphin
Dolphin
Posts: 93
Joined: Fri Jul 23, 2021 7:35 am

Re: General Help and Quick Questions

Postby deice » Fri Jan 21, 2022 11:14 am

Shrek128 wrote:
Fri Jan 21, 2022 3:08 am
I am a beginner on SMBX2, and I would like to have some questions that I can't find the answer. :oops:

-How do you put a waterfall in the world map? I can't find it.

-What is the difference between "Custom" and "Reserved"?

-How do I use NPC packs or texture packs (after downloading)?

Thanks in advance for your answers. :D
1. you have to create or find a custom graphic for it. if you don't wish to replace one of the few already existing animated tiles, you have to also use some lua as map customization isn't very robust, i suggest either smwmap or chocomap.

2. unlike the custom range, the reserved range shouldn't be touched as it will likely be used for basegame content by a future smbx2 version.

3. graphics are placed either in a folder of the same name as a given level (minus the extension) that is then itself placed in the same directory as said level, or directly into the episode folder if you wish for the graphic replacement to apply to every level in the episode. as for custom npcs and other lua code, see here.

User avatar
marioman2007
Ripper II
Ripper II
Posts: 300
Joined: Tue Aug 25, 2020 3:19 am
Pronouns: He/Him

Re: General Help and Quick Questions

Postby marioman2007 » Fri Jan 21, 2022 11:17 am

Shrek128 wrote:
Fri Jan 21, 2022 3:08 am
I am a beginner on SMBX2, and I would like to have some questions that I can't find the answer. :oops:

-How do you put a waterfall in the world map? I can't find it.

-What is the difference between "Custom" and "Reserved"?

-How do I use NPC packs or texture packs (after downloading)?

Thanks in advance for your answers. :D
1) You can get some waterfall GFX in the assets archive

2) Custom range is from 751-1000, people can create custom NPCs/blocks/BGOs under this range. While reserved stuff will be used by the developers in the future

3) viewtopic.php?f=101&t=23744

EDIT: lol I am 3 minutes late from deice, oops
Just learning Lua and Importing Graphics

SmgLifeSystem.lua - Custom Health and more!

The Super Cool Pack: I support:
Spoiler: show
Image
Image

Shrek128
Goomba
Goomba
Posts: 3
Joined: Thu Jan 20, 2022 5:56 am
Pronouns: him

Re: General Help and Quick Questions

Postby Shrek128 » Mon Jan 24, 2022 2:22 pm

First of all, I would like to thank the people who answered me. ;)
I have a question: how do you create a level that can be played only once?

User avatar
deice
Dolphin
Dolphin
Posts: 93
Joined: Fri Jul 23, 2021 7:35 am

Re: General Help and Quick Questions

Postby deice » Mon Jan 24, 2022 2:50 pm

Shrek128 wrote:
Mon Jan 24, 2022 2:22 pm
I have a question: how do you create a level that can be played only once?
if you mean a level that makes itself completely unplayable after being cleared, this isn't possible within vanilla smbx. maybe using lua you could wait until the level's been exited and then overwrite the level file with junk, but lunalua has limitations to it's file system to prevent malicious code from being run so i'm not sure if that's possible either.

if you mean a level that isn't (practically) accessible after being played once, it depends:
- in a hub-style episode, you could for example require something like a switch palace switch to be pressed to beat the level, then block it off in the hub using that same switch. there's plenty of ways to go about it even in vanilla.
- on the world map, there's no real way to block levels off from the get-go without using lua. any way of blocking entry in a level would have to be within the level itself (example, a wall and an offscreen exit) but this is a bit crude.

Shrek128
Goomba
Goomba
Posts: 3
Joined: Thu Jan 20, 2022 5:56 am
Pronouns: him

Re: General Help and Quick Questions

Postby Shrek128 » Mon Jan 24, 2022 3:26 pm

deice wrote:
Mon Jan 24, 2022 2:50 pm
Shrek128 wrote:
Mon Jan 24, 2022 2:22 pm
I have a question: how do you create a level that can be played only once?
if you mean a level that makes itself completely unplayable after being cleared, this isn't possible within vanilla smbx. maybe using lua you could wait until the level's been exited and then overwrite the level file with junk, but lunalua has limitations to it's file system to prevent malicious code from being run so i'm not sure if that's possible either.

if you mean a level that isn't (practically) accessible after being played once, it depends:
- in a hub-style episode, you could for example require something like a switch palace switch to be pressed to beat the level, then block it off in the hub using that same switch. there's plenty of ways to go about it even in vanilla.
- on the world map, there's no real way to block levels off from the get-go without using lua. any way of blocking entry in a level would have to be within the level itself (example, a wall and an offscreen exit) but this is a bit crude.
OK, thanks you! I don't know how to use lua, it will be more limited... I will find something else... :?


Return to “Help and Support”

Who is online

Users browsing this forum: No registered users and 3 guests