Post new topic    
Slime
Send private message
How can I display the player's level on screen? 
 PostFri Apr 03, 2020 12:53 am
Send private message Reply with quote
Basically, I just need to display the player's level on a corner of the screen, without accessing any menus. Kind of like a HUD, that's visible while walking around.
Liquid Metal Slime
Send private message
 
 PostFri Apr 03, 2020 1:05 am
Send private message Reply with quote
A simple way would be to call `show string at(ID, x, y)` each tick while the game is running. There wouldn't be any graphics with it, but it'd have the level onscreen.

In a while loop that runs while the game is being played, you'll have to set a string (say, ID 0) to the hero's level, and then call show string at() with that string ID.

append number(0, get hero level(0))
show string at(0, 0, 0)

If you want some HUD graphics, you might try checking out slice collections, and load one of those. If you use a text slice to display the value, you'll have to use `set slice text(handle, string ID)` instead of `show string at`
Ps. I love my wife
Display posts from previous: