SMBX2 vs 1.3.0.1

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

Moderator: Userbase Moderators

Walleo64
Koopa
Koopa
Posts: 19
Joined: Mon Apr 06, 2015 1:59 pm

SMBX2 vs 1.3.0.1

Postby Walleo64 » Mon Sep 27, 2021 4:04 pm

The other day I was trying to make an episode using SMBX 1.3.0.1 (the one I normally use) where along with a main exit, each level has stars scattered around in mini-challenges that make up a lot of the level, but I stopped once I learned that each section can only have one star. It got me thinking about the degree of interactivity that can be had in a SMBX level, so I thought I'd ask if there's any difference between my 1.3.0.1 copy and SMBX2. I want to have more collectibles in the levels, or at the very least have more ways to unlock a collectible than just "destroy these things" or "talk to this person". Also I don't really want to have to learn Lua or anything like that. With all that in mind, is it worth getting SMBX2 or should I just make do with what I have?

Cedur
Link
Link
Posts: 7073
Joined: Tue Jun 28, 2016 10:14 am
Flair: I'm gone, for chess and minesweeper
Pronouns: he/him

Re: SMBX2 vs 1.3.0.1

Postby Cedur » Mon Sep 27, 2021 6:54 pm

To my knowledge SMBX2 is nowhere different in terms of "no more than 1 star per section" but it's worth in many other aspects anyway and not hard to get used to!

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

Re: SMBX2 vs 1.3.0.1

Postby Marioman2007 » Tue Sep 28, 2021 2:31 am

What can you do, is to create a variable and make it go up by 1 whenever the player collects any OTHER NPC and kill that NPC when the player again enters the level.
I don't have enough time right now, so I will post the code later.

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

Re: SMBX2 vs 1.3.0.1

Postby Marioman2007 » Wed Sep 29, 2021 3:55 am

I forgot about this
but here's the code:

Code: Select all

local myCollectible = your npc ID here
SaveData.collectibleValue = SaveData.collectibleValue or 0

function onNPCKill(eventToken, killedNPC, harmType)
    if killedNPC.id == myCollectible then
        SaveData.collectibleValue = SaveData.collectibleValue + 1
    end
end

function onDraw()
    Text.print(tostring(SaveData.collectibleValue),1,0,0)
end
Last edited by Marioman2007 on Wed Sep 29, 2021 9:56 am, edited 2 times in total.

Walleo64
Koopa
Koopa
Posts: 19
Joined: Mon Apr 06, 2015 1:59 pm

Re: SMBX2 vs 1.3.0.1

Postby Walleo64 » Wed Sep 29, 2021 7:50 am

marioman2007 wrote:
Wed Sep 29, 2021 3:55 am
I forgot about this
but here's the code:

Code: Select all

local myCollectible = your npc ID here
local collectibleValue = 0

functio onNPCKill(eventToken, killedNPC, harmType)
    if killedNPC.id == myCollectible then
        collectibleValue = collectibleValue + 1
    end
end

function onDraw()
    Text.print(tostring(collectibleValue),1,0,0)
end
Is this something for SMBX2 or do I need an external program to input this code?

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

Re: SMBX2 vs 1.3.0.1

Postby Marioman2007 » Wed Sep 29, 2021 8:33 am

Walleo64 wrote:
Wed Sep 29, 2021 7:50 am
marioman2007 wrote:
Wed Sep 29, 2021 3:55 am
I forgot about this
but here's the code:

Code: Select all

local myCollectible = your npc ID here
local collectibleValue = 0

function onNPCKill(eventToken, killedNPC, harmType)
    if killedNPC.id == myCollectible then
        collectibleValue = collectibleValue + 1
    end
end

function onDraw()
    Text.print(tostring(collectibleValue),1,0,0)
end
Is this something for SMBX2 or do I need an external program to input this code?
SMBX2, put this code in a luna.lua file, also updated the code.


Return to “Help and Support”

Who is online

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

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari