How can I display the player's level on screen?
Moderators: marionline, SDHawk
- Gigglyardo
- Slime
- Posts: 9
- Joined: Sun Aug 16, 2015 1:20 am
How can I display the player's level on screen?
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.
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`
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`
My pronouns are they/them
Ps. I love my wife
Ps. I love my wife