Problems with Misc.score(number)

Post here for help and support regarding LunaLua and SMBX2's libraries and features.

Moderator: Userbase Moderators

baenyth
Koopa
Koopa
Posts: 16
Joined: Mon Sep 07, 2020 6:34 pm
Pronouns: she/her

Problems with Misc.score(number)

Postby baenyth » Mon Nov 09, 2020 12:55 am

I'm trying to use Misc.score(number) in my levels to set the score value, but they don't seem to work. I've tried using it in coroutines, in onTick(), and in onStart(). Here's how I encoded it:
Misc.score(18)
Misc.score(120)
But the score never changes. Is there something I'm doing wrong here?

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9865
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: Problems with Misc.score(number)

Postby Emral » Mon Nov 09, 2020 1:27 am

The feature was mistakenly documented when it didn't exist. It'll be in the next version, now that I've added it. For the time being you can manipulate SaveData._basegame.hud.score directly.


Return to “LunaLua Help”

Who is online

Users browsing this forum: No registered users and 1 guest

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari