Death Counter

Share and discuss custom LunaLua code and content packs for SMBX2.
LooKiCH
Tweeter
Tweeter
Posts: 158
Joined: Tue Jun 13, 2017 11:28 am
Pronouns: he/him
Contact:

Death Counter

Postby LooKiCH » Mon Sep 19, 2022 6:52 pm

This script counts the number of deaths in an episode/level. If you are on the world map, or you are in the hub, then the number of total deaths in the episode will be displayed. But if you are in the level, then the number of deaths in level will be displayed

SCREENSHOT: show
Image

DOWNLOAD v1.1

how to use: show
create file luna.lua and map.lua (if it's an episode) and paste it into both files:

Code: Select all

require("deaths")
P. S. if you want the script to work in all episodes and levels, save the contents of the archive to the "scripts" folder and in the "lunabase.lua" file (at the end of the file) in the "scripts/base/game" folder you load the library
changelog: show
v1.1: Fixed some bugs: after completing a level with minhud (for example, Bootstrap Bealach (only it has minhud) in Ed Laborate), the number of deaths through my script had stopped displaying due to the fact that SaveData.deathCount was remaining not "nil" (if SaveData.deathCount is not "nil" then the number of deaths doesn't display through my script)
Last edited by LooKiCH on Tue Feb 06, 2024 3:31 pm, edited 4 times in total.

LooKiCH
Tweeter
Tweeter
Posts: 158
Joined: Tue Jun 13, 2017 11:28 am
Pronouns: he/him
Contact:

Death Counter v1.1

Postby LooKiCH » Mon Feb 27, 2023 9:54 am

New version 1.1 is out: Fixed some bugs: after completing a level with minhud (for example, Bootstrap Bealach (only it has minhud) in Ed Laborate), the number of deaths through my script had stopped displaying due to the fact that SaveData.deathCount was remaining not "nil" (if SaveData.deathCount is not "nil" then the number of deaths doesn't display through my script)
Last edited by LooKiCH on Mon Feb 27, 2023 12:39 pm, edited 1 time in total.

MarioChallengerX2
Bit
Bit
Posts: 77
Joined: Sat Dec 31, 2022 4:34 pm
Pronouns: he/him

Re: Death Counter v1.1

Postby MarioChallengerX2 » Mon Feb 27, 2023 10:02 am

LooKiCH wrote:
Mon Feb 27, 2023 9:54 am
New version 1.1 is out: Fixed some bugs
So...what are those bugs that were fixed?

LooKiCH
Tweeter
Tweeter
Posts: 158
Joined: Tue Jun 13, 2017 11:28 am
Pronouns: he/him
Contact:

Re: Death Counter v1.1

Postby LooKiCH » Mon Feb 27, 2023 12:38 pm

MarioChallengerX2 wrote:
Mon Feb 27, 2023 10:02 am
LooKiCH wrote:
Mon Feb 27, 2023 9:54 am
New version 1.1 is out: Fixed some bugs
So...what are those bugs that were fixed?
after completing a level with minhud (for example, Bootstrap Bealach (only it has minhud) in Ed Laborate), the number of deaths through my script had stopped displaying due to the fact that SaveData.deathCount was remaining not "nil" (if SaveData.deathCount is not "nil" then the number of deaths doesn't display through my script)


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 0 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari