Hello there! π
To display player information like their name, health, and armor in your SpiffyHUD, you can use Text elements combined with placeholders.
Here's how you can do it:
1. Player Name
To show the player's name, you can use the playername placeholder within a Single-Line Text element (or a regular Text element):
{"placeholder":"playername"}
2. Player Health
For the player's health, you have a few options:
- Current Health: To display the exact health points:
{"placeholder":"current_player_health"} - Max Health: To show the maximum possible health points:
{"placeholder":"max_player_health"} - Health Percentage: To show health as a percentage:
{"placeholder":"current_player_health_percent"}
You can combine these in a Single-Line Text element to show something like 20/20 (100%):
{"placeholder":"current_player_health"}/{"placeholder":"max_player_health"} ({"placeholder":"current_player_health_percent"}%)
If you want to display health as a bar, you would use a Progress Bar element with these placeholders. For a detailed guide on creating custom progress bars, you can check out this example (for Drippy, but concepts apply).
3. Player Armor
Similarly, for player armor:
- Current Armor: To display the current armor points:
{"placeholder":"current_player_armor"} - Max Armor: To show the maximum possible armor points:
{"placeholder":"max_player_armor"} - Armor Percentage: To show armor as a percentage:
{"placeholder":"current_player_armor_percentage"}