How to make custom NPC visible?

Need help with any SMBX game-related issues? Ask your questions here.
vladimirdog2021
Spiny
Spiny
Posts: 27
Joined: Wed Aug 17, 2022 5:13 am
Flair: SMBX Expert
Pronouns: he/him
Contact:

How to make custom NPC visible?

Postby vladimirdog2021 » Wed Mar 08, 2023 4:09 pm

I have a custom NPC that I want to use in my SMBX2 level but I can't make it visible. Help?

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9708
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: How to make custom NPC visible?

Postby Emral » Wed Mar 08, 2023 8:27 pm

NPCs are visible by default. Can you share more information about your custom NPC? Spritesheet, lua file setup, editor ini...

vladimirdog2021
Spiny
Spiny
Posts: 27
Joined: Wed Aug 17, 2022 5:13 am
Flair: SMBX Expert
Pronouns: he/him
Contact:

Re: How to make custom NPC visible?

Postby vladimirdog2021 » Thu Mar 09, 2023 6:13 am

Emral wrote:
Wed Mar 08, 2023 8:27 pm
Can you share more information about your custom NPC?
This custom NPC was created by me and it's invisible by default in SMBX2.

Maybe I set it up incorrectly? :roll:

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9708
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: How to make custom NPC visible?

Postby Emral » Thu Mar 09, 2023 8:52 am

vladimirdog2021 wrote:
Thu Mar 09, 2023 6:13 am
Emral wrote:
Wed Mar 08, 2023 8:27 pm
Can you share more information about your custom NPC?
This custom NPC was created by me and it's invisible by default in SMBX2.

Maybe I set it up incorrectly? :roll:
The default state of NPCs is visible. Unless you messed up somewhere, NPCs have no reason to be invisible, which is why I requested more information, so that I can maybe take a look over the relevant files and find the thing that causes it to be invisible.

vladimirdog2021
Spiny
Spiny
Posts: 27
Joined: Wed Aug 17, 2022 5:13 am
Flair: SMBX Expert
Pronouns: he/him
Contact:

Re: How to make custom NPC visible?

Postby vladimirdog2021 » Thu Mar 09, 2023 9:14 am

Does changing the name of the custom NPC to "npc-751.png" probably fix this?

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9708
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: How to make custom NPC visible?

Postby Emral » Thu Mar 09, 2023 9:55 am

vladimirdog2021 wrote:
Thu Mar 09, 2023 9:14 am
Does changing the name of the custom NPC to "npc-751.png" probably fix this?
Just upload the files and I take a look and tell you where the issue is. Guesswork takes too long.

vladimirdog2021
Spiny
Spiny
Posts: 27
Joined: Wed Aug 17, 2022 5:13 am
Flair: SMBX Expert
Pronouns: he/him
Contact:

Re: How to make custom NPC visible?

Postby vladimirdog2021 » Thu Mar 09, 2023 10:22 am

SMBX2 decided to recognize my custom NPC and make it visible.

EDIT: For some reason, the custom NPC is jumping nonstop, IDK why.

deice
Volcano Lotus
Volcano Lotus
Posts: 538
Joined: Fri Jul 23, 2021 7:35 am

Re: How to make custom NPC visible?

Postby deice » Thu Mar 09, 2023 11:38 am

vladimirdog2021 wrote:
Thu Mar 09, 2023 10:22 am
EDIT: For some reason, the custom NPC is jumping nonstop, IDK why.
that's just what the placeholder ai script does. the npc's behavior can be changed by editing its .lua file.

vladimirdog2021
Spiny
Spiny
Posts: 27
Joined: Wed Aug 17, 2022 5:13 am
Flair: SMBX Expert
Pronouns: he/him
Contact:

Re: How to make custom NPC visible?

Postby vladimirdog2021 » Thu Mar 09, 2023 11:51 am

deice wrote:
Thu Mar 09, 2023 11:38 am
npc's behavior can be changed by editing its .lua file
I opened the .lua file, and where's the jumping script and where to disable this?

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9708
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: How to make custom NPC visible?

Postby Emral » Thu Mar 09, 2023 4:14 pm

vladimirdog2021 wrote:
Thu Mar 09, 2023 11:51 am
deice wrote:
Thu Mar 09, 2023 11:38 am
npc's behavior can be changed by editing its .lua file
I opened the .lua file, and where's the jumping script and where to disable this?
Scroll down to the comment that reads that the default behaviour is jumping. The lines below that comment are the jump behaviour and can be commented out or removed to disable the jumping.

vladimirdog2021
Spiny
Spiny
Posts: 27
Joined: Wed Aug 17, 2022 5:13 am
Flair: SMBX Expert
Pronouns: he/him
Contact:

Re: How to make custom NPC visible?

Postby vladimirdog2021 » Fri Mar 10, 2023 3:03 am

What are the NPC jumping script names?

EDIT: I just tried removing the NPC jumping script and nothing's changed.

deice
Volcano Lotus
Volcano Lotus
Posts: 538
Joined: Fri Jul 23, 2021 7:35 am

Re: How to make custom NPC visible?

Postby deice » Sat Mar 11, 2023 2:49 pm

vladimirdog2021 wrote:
Fri Mar 10, 2023 3:03 am
EDIT: I just tried removing the NPC jumping script and nothing's changed.
the part you're supposed to remove is:

Code: Select all

if v.collidesBlockBottom then
	v.speedY = -6
end
though i think it's worth noting (and i don't mean to sound condescending) that if you don't know how to do this, you're probably better off not messing with lua files yet.

vladimirdog2021
Spiny
Spiny
Posts: 27
Joined: Wed Aug 17, 2022 5:13 am
Flair: SMBX Expert
Pronouns: he/him
Contact:

Re: How to make custom NPC visible?

Postby vladimirdog2021 » Sun Mar 12, 2023 4:55 am

Does it remove the "--Execute main AI. This template just jumps when it touches the ground."?

Edit: The custom NPC doesn't jump anymore.

vladimirdog2021
Spiny
Spiny
Posts: 27
Joined: Wed Aug 17, 2022 5:13 am
Flair: SMBX Expert
Pronouns: he/him
Contact:

Re: How to make custom NPC visible?

Postby vladimirdog2021 » Sun Mar 12, 2023 7:51 am

How do I make the event start when the player enters the trigger?


Return to “Help and Support”

Who is online

Users browsing this forum: Petal [Bot] and 0 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari