Solarus-Games English Forum

Solarus => Development => Topic started by: Davias on July 25, 2021, 11:31:30 AM

Title: Different HUD
Post by: Davias on July 25, 2021, 11:31:30 AM
Hello, I am learning and experimenting with the solarus engine in the last few weeks and I have a question about changing the HUD style.
How do I create a HUD with Numbers instead of Hearts ( like in the Mana or Final Fantasy RPGs ). Is it possible to do this via a special script or something?
Title: Re: Different HUD
Post by: Max on August 04, 2021, 06:50:33 PM
Hi!
Yeah, a HUD with numbers would actually probably be much easier than hearts, haha, and you would write a script for this, just as you already have a script that displays health as hearts. The Solarus engine doesn't display any HUD, all of that is done via game scripts. If you're not really familiar with how scripting in Solarus works and stuff, I'd recommend waiting to change the HUD until once you're more experienced, as that's more abstract than other concepts like map entities.

Here's an example of a bar-style health HUD element, if that's useful:
https://gitlab.com/maxmraz/yarntown/-/blob/master/data/scripts/hud/health_bar.lua