Is there a way to have two players, with the same controls but different jump buttons?

Post here for help and support regarding LunaLua and SMBX2's libraries and features.
Max Flower
Rex
Rex
Posts: 30
Joined: Mon Apr 22, 2019 11:30 pm
Flair: SMBX2 good
Pronouns: He/Him

Is there a way to have two players, with the same controls but different jump buttons?

Postby Max Flower » Thu May 25, 2023 7:59 am

So I've been trying to make a Mario & Luigi custom playable character based off the Alphadream RPGS, and I've gotten pretty far.

I actually have done what the subject of this topic says, but the problem is it isn't perfect, Luigi isn't lined up with Mario and the place Luigi returns to after jumping isn't perfect either.
Image

Basically the method I'm using is just teleporting Luigi's hitbox's x coordinate next to Mario all the time and then for the jumping I just gave Luigi his own speedY value.
Luigi himself is drawn via the sprite class, drawing his sprite and teleporting it to the hitbox, and doing the animations as well.

Anyway is there a way to do this same thing but in a much easier way, possibly using the supermario128 cheat code?
OR is there a better way to detect if Luigi is touching the ground? The way I'm currently doing it is just by having another collider teleported to the bottom of Luigi's hitbox and detecting when that's colliding with a block.

Return to “LunaLua Help”

Who is online

Users browsing this forum: No registered users and 0 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari