HoverMeter.lua

Share and discuss custom LunaLua code and content packs for SMBX2.
MECHDRAGON777
Pink Yoshi Egg
Pink Yoshi Egg
Posts: 6422
Joined: Fri Dec 20, 2013 6:40 pm
Flair: Nuclear Queen of Reversion.
Contact:

HoverMeter.lua

Postby MECHDRAGON777 » Sat Aug 08, 2020 7:01 am

For those of you who just want to see the amount of time left on your Hover.

Image
Download

Customizable Fields with their default values:

Graphic for the Bar
HoverMeter.base = Graphics.loadImage(Misc.resolveFile("HoverMeter.png")) Image
Graphic for the Pegs in the Bar
HoverMeter.peg = Graphics.loadImage(Misc.resolveFile("Peg.png")) ImageImageImageImageImageImageImageImage
The X position to draw the bar
HoverMeter.barX = 331
The Y position to draw the bar
HoverMeter.barY = 566
How far to the right of the bar the top left most pixel of the first peg is. (Use Negative Numbers if the first peg is to the left, draws from left to right.)
HoverMeter.pegOffsetX = 26
How far below the top left most pixel of the bar image the pegs are. (Use Negative Numbers if the pegs are to above instead of below the top most pixel.)
HoverMeter.pegOffsetY = 8
How many pegs the bar should have. (Note that Peach's HoverTimer counts down from 64 frames and 99 frames depending on her powerup state.)
HoverMeter.pegCount = 8
How wide each Peg is.
HoverMeter.pegWidth = 14
The Priority of the bar.
HoverMeter.barPriority = 4.99999999
The Priority of the pegs.
HoverMeter.pegPriority = 5
Last edited by MECHDRAGON777 on Sat Aug 08, 2020 5:40 pm, edited 1 time in total.

Tails608
Koopa
Koopa
Posts: 16
Joined: Fri Jan 03, 2020 12:00 pm

Re: HoverMeter.lua

Postby Tails608 » Sat Aug 08, 2020 7:03 am

Looks very cool ! probably gonna use it in some of my levels / episodes

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

Re: HoverMeter.lua

Postby Cedur » Sat Aug 08, 2020 9:38 am

can this also be done for leaf / Blue Yoshi flights?

MECHDRAGON777
Pink Yoshi Egg
Pink Yoshi Egg
Posts: 6422
Joined: Fri Dec 20, 2013 6:40 pm
Flair: Nuclear Queen of Reversion.
Contact:

Re: HoverMeter.lua

Postby MECHDRAGON777 » Sat Aug 08, 2020 2:05 pm

Cedur wrote:
Sat Aug 08, 2020 9:38 am
can this also be done for leaf / Blue Yoshi flights?
I can probably add that into it later. My goal is to make it customizable even further by allowing the user to change the max hover time as well.

MECHDRAGON777
Pink Yoshi Egg
Pink Yoshi Egg
Posts: 6422
Joined: Fri Dec 20, 2013 6:40 pm
Flair: Nuclear Queen of Reversion.
Contact:

Re: HoverMeter.lua

Postby MECHDRAGON777 » Thu Aug 13, 2020 1:15 am

Found a glitch with the code. I have fixed it, but am trying to get the bar to be 2 player comparable first before releasing it. I have already added Cedur's request to the bar as well.


Return to “LunaLua”

Who is online

Users browsing this forum: DB12, MrPunchia and 0 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari