Page 1 of 1
SMBX2 vs 1.3.0.1
Posted: Mon Sep 27, 2021 4:04 pm
by Walleo64
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?
Re: SMBX2 vs 1.3.0.1
Posted: Mon Sep 27, 2021 6:54 pm
by Cedur
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!
Re: SMBX2 vs 1.3.0.1
Posted: Tue Sep 28, 2021 2:31 am
by Marioman2007
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.
Re: SMBX2 vs 1.3.0.1
Posted: Wed Sep 29, 2021 3:55 am
by Marioman2007
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
Re: SMBX2 vs 1.3.0.1
Posted: Wed Sep 29, 2021 7:50 am
by Walleo64
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?
Re: SMBX2 vs 1.3.0.1
Posted: Wed Sep 29, 2021 8:33 am
by Marioman2007
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.