SMB3 Overhaul Timer Question

General discussion about Super Mario Bros. X.
Forum rules
Before you make a topic/post, consider the following:
-Is there a topic for this already?
-Is your post on-topic/appropriate?
-Are you posting in the right forum/following the forum rules?
User avatar
Bottle_of_Water
Spiny
Spiny
Posts: 47
Joined: Wed May 29, 2019 5:35 pm
Flair: I am essential to life.
Current Project: Luigi's Quest - The Seven Trials
Chat Username: Bottle o' Water

SMB3 Overhaul Timer Question

Postby Bottle_of_Water » Tue Jun 11, 2019 11:50 am

So I want to use Lunaworld and have settings like this V that way I can fix a bug with loading.
Spoiler: show
_smb3overhaul = loadAPI("smb3overhaul");

function onLoad()
_smb3overhaul.setSecondsLeft(241);
_smb3overhaul.setTimerState(true);
_smb3overhaul.usesPBar(false);
_smb3overhaul.useEasyMode(false);
_smb3overhaul.usesCard(true);
_smb3overhaul.disableSpinJump(false);
end

local altpsystem = API.load("altpsystem");
My question is how do I change the setSecondsLeft in an individual level? So it is different in that level vs how it is set here?
I usually do not like water levels in Video Games.

My Projects:

Custom World - Really Old Game, and pretty bad too. This was more of a experimental episode.

New Super Mario Bros Remaster - NSMB DS but in my style

Luigi's Quest - The Seven Trials - My Current Game I'm Working On. This is what I always wanted to make as a kid, and I've been working on this for 2 Years probably.

User avatar
hacheipe399
Fighter Fly
Fighter Fly
Posts: 62
Joined: Mon Feb 10, 2014 12:29 pm
Current Project: Be an engineer in 5 years.

Re: SMB3 Overhaul Timer Question

Postby hacheipe399 » Tue Jun 11, 2019 12:14 pm

SMB3 Overhaul is deprecated, since it relies on a very outdated version of LunaLUA.
I'm the spanish translator of the PGE Project. Please use it and give feedback to improve the software!
My LunaLua API:
Image

My currently released GFX work:
Image
Image
Image

I'm Hardcore 2 da bone.
1. for the treble.
2. for the bass

User avatar
Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 7626
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: SMB3 Overhaul Timer Question

Postby Enjl » Tue Jun 11, 2019 1:08 pm

load it in level lua rather than episode lua
ImageImageImageImage
ImageImageImageImageImageImage

User avatar
Bottle_of_Water
Spiny
Spiny
Posts: 47
Joined: Wed May 29, 2019 5:35 pm
Flair: I am essential to life.
Current Project: Luigi's Quest - The Seven Trials
Chat Username: Bottle o' Water

Re: SMB3 Overhaul Timer Question

Postby Bottle_of_Water » Tue Jun 11, 2019 2:08 pm

I tried that but it doesn't work.
I renamed it Lunadll and I put this in it
Spoiler: show
_smb3overhaul = loadAPI("smb3overhaul");

function onLoad()
_smb3overhaul.setSecondsLeft(0);
_smb3overhaul.setTimerState(false);
end
I usually do not like water levels in Video Games.

My Projects:

Custom World - Really Old Game, and pretty bad too. This was more of a experimental episode.

New Super Mario Bros Remaster - NSMB DS but in my style

Luigi's Quest - The Seven Trials - My Current Game I'm Working On. This is what I always wanted to make as a kid, and I've been working on this for 2 Years probably.

User avatar
Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 7626
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: SMB3 Overhaul Timer Question

Postby Enjl » Tue Jun 11, 2019 2:13 pm

Are you on beta 3? Even if you're on beta 3, please change your code a little:
1) API.load() is the beta 3 version of loadAPI. It's generally safer. On newer builds, we use the require() alias cause it's what lua would use anyway.
2) onStart has replaced onLoad shortly after beta 2 (two) released. Generally safer.
3) Make sure to use the "local" keyword to restrict the scope of your variables.
Now..
If you're on Beta 3, you mustn't activate smb3overhaul in episode lua for the level lua version to take precedence. Lunadll.lua runs BEFORE lunaworld.lua.
If you're using the MAGLX3 build, however, you can...
-deliberately NOT put your _smb3overhaul as local in episode-wide luna.lua, and
-access it from level-wide luna.lua and set the seconds in onStart there and whatnot
-level-wide luna.lua runs AFTER episode-wide luna.lua after all
ImageImageImageImage
ImageImageImageImageImageImage

User avatar
Bottle_of_Water
Spiny
Spiny
Posts: 47
Joined: Wed May 29, 2019 5:35 pm
Flair: I am essential to life.
Current Project: Luigi's Quest - The Seven Trials
Chat Username: Bottle o' Water

Re: SMB3 Overhaul Timer Question

Postby Bottle_of_Water » Tue Jun 11, 2019 2:30 pm

So i cant have an episode lua and level lua at the same time, so every level has to have a unique lua to change the timer?
I usually do not like water levels in Video Games.

My Projects:

Custom World - Really Old Game, and pretty bad too. This was more of a experimental episode.

New Super Mario Bros Remaster - NSMB DS but in my style

Luigi's Quest - The Seven Trials - My Current Game I'm Working On. This is what I always wanted to make as a kid, and I've been working on this for 2 Years probably.

User avatar
Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 7626
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: SMB3 Overhaul Timer Question

Postby Enjl » Tue Jun 11, 2019 2:58 pm

Well... you could also make sure the library is loaded shared (API.load does that by default) and then deactivate the timer sometime AFTER lunaworld's onStart.. It's all rather convoluted though cause of the execution order, which is the main reason why we changed it for future versions. (you basically need frame 1 of onTickEnd I believe)
ImageImageImageImage
ImageImageImageImageImageImage


Return to “General”

Who is online

Users browsing this forum: Google [Bot] and 2 guests