SMBX2 characters help?

Need help with any SMBX game-related issues? Ask your questions here.

Moderator: Userbase Moderators

Prismarine
2025 Egg Hunter
2025 Egg Hunter
Posts: 325
Joined: Thu Jul 25, 2024 5:34 am
Flair: fish
Pronouns: i identify as sand

SMBX2 characters help?

Postby Prismarine » Tue Oct 15, 2024 2:38 pm

I wanted to make a metroid game with Samus only, But i have no idea how to make samus the only playable character in the episode. Can anyone help? :?:

Ness-Wednesday
Purple Yoshi Egg
Purple Yoshi Egg
Posts: 1657
Joined: Sun Jun 28, 2015 3:50 pm
Flair: Diverse Scouts
Pronouns: He/Him

Re: SMBX2 characters help?

Postby Ness-Wednesday » Tue May 06, 2025 9:08 am

Late reply, but I noticed this question was left unanswered and felt answering could help anyone reading this.

There are two ways to do this. You can individually select each level (including the hub) in the episode to start with Samus via Level Settings...
Image
...OOOOORRRRRRRR you can make a lua file in your episode's folder and set the following in onStart (or onTick if you're evil):

Code: Select all

player:transform(16)
Edit: Thanks to Marioman for the correction. Use player:transform(16) instead of player.character = 16. His explanation is down below.
Last edited by Ness-Wednesday on Tue May 06, 2025 10:12 am, edited 1 time in total.

Marioman2007
2025 Egg Hunter
2025 Egg Hunter
Posts: 537
Joined: Tue Aug 25, 2020 3:19 am
Flair: Dr. Bones
Pronouns: He/Him

Re: SMBX2 characters help?

Postby Marioman2007 » Tue May 06, 2025 10:04 am

Ness-Wednesday wrote:
Tue May 06, 2025 9:08 am

Code: Select all

player.character = 16
Doing "player:transform(16)" is better.

what's the difference?
- setting character will directly change the character, so like if the player is fire mario, it'll change to fire samus
- using tranform will keep the corresponding powerup, if the player is fire mario and samaus was previously super samus, it'll change to super samus instead of fire samus

This is important for scripts which keep track of per-character data, one such example is customPowerups.

Ness-Wednesday
Purple Yoshi Egg
Purple Yoshi Egg
Posts: 1657
Joined: Sun Jun 28, 2015 3:50 pm
Flair: Diverse Scouts
Pronouns: He/Him

Re: SMBX2 characters help?

Postby Ness-Wednesday » Tue May 06, 2025 10:09 am

Marioman2007 wrote:
Tue May 06, 2025 10:04 am
Ness-Wednesday wrote:
Tue May 06, 2025 9:08 am

Code: Select all

player.character = 16
Doing "player:transform(16)" is better.

what's the difference?
- setting character will directly change the character, so like if the player is fire mario, it'll change to fire samus
- using tranform will keep the corresponding powerup, if the player is fire mario and samaus was previously super samus, it'll change to super samus instead of fire samus

This is important for scripts which keep track of per-character data, one such example is customPowerups.
Oh wow, I've been using Player.character=16 forever, and honestly didn't know this was possible with characters. Thank you so much!


Return to “Help and Support”

Who is online

Users browsing this forum: Amazon [Bot] and 1 guest

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari