Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
MythicMobs MythicMobs
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 154
    • Issues 154
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • MythicCraft
  • MythicMobsMythicMobs
  • Wiki
    • Guides
  • Health Displays

Health Displays · Changes

Page history
Create Guides/Health Displays authored Apr 01, 2024 by Amy's avatar Amy
Hide whitespace changes
Inline Side-by-side
Showing with 52 additions and 0 deletions
+52 -0
  • Guides/Health-Displays.md Guides/Health-Displays.md +52 -0
  • No files found.
Guides/Health-Displays.md 0 → 100644
View page @ cdb44193
You may want to display your mobs health to players who are fighting it, there are a few different ways of doing this and this guide will go over them!
# Boss Bars
You can create a Boss Bar for your mob and use it to display your mobs health much like the Ender Dragon or Wither has. The process is simple.
```yaml
SkeletonKing:
Type: WITHER_SKELETON
BossBar:
Enabled: true
Title: '&cSkeleton King!'
Range: 50
Color: GREEN
Style: SEGMENTED_12
```
# Nameplate
You can display the mobs health in its nameplate above it, you can do this many different ways, here are 2 examples, one which shows the mobs health as a number (15/20) and another which has a bar that changes as the mob loses health.
### Number
You will need to use the [SetName](/skills/mechanics/setname) mechanic and the [~onDamaged](/Skills/Triggers#ondamaged) trigger. We will use the mobs display option to set the information. We are using the caster.hp and caster.mhp placeholders to get the current HP and the max HP.
```yaml
SkeletonKing:
Type: WITHER_SKELETON
Display: '&6Skeleton King &7(<caster.hp>/<caster.mhp>)'
Skills:
- setname{n=<caster.name>;delay=2} @self ~onDamaged
```
### Health Bar
This is a more complicated process but the same basic premise. In this basic example we will setup a [Metaskill](/Skills/Metaskills) which sets the mobs name depending on the mobs health using health modifiers, and we are setting the starting bar when the mob spawns
```yaml
SkeletonKing:
Type: WITHER_SKELETON
Skills:
- skill{s=HealthBar} @self ~onDamaged
- setname{n="&8[&a||||||||||&8]"} @self ~onSpawn
```
```yaml
HealthBar:
Skills:
- setname{n="&8[&a||||||||||&8]"} @self =91%-100%
- setname{n="&8[&a|||||||||&7|&8]"} @self =81%-90%
- setname{n="&8[&a||||||||&7||&8]"} @self =71%-80%
- setname{n="&8[&a|||||||&7|||&8]"} @self =61%-70%
- setname{n="&8[&a||||||&7||||&8]"} @self =51%-60%
- setname{n="&8[&a|||||&7|||||&8]"} @self =41%-50%
- setname{n="&8[&a||||&7||||||&8]"} @self =31%-40%
- setname{n="&8[&a|||&7|||||||&8]"} @self =21%-30%
- setname{n="&8[&a||&7||||||||&8]"} @self =11%-20%
- setname{n="&8[&a|&7|||||||||&8]"} @self =0%-10%
```
\ No newline at end of file
Clone repository
Home
Changelogs
Premium Features
Commands and Permissions
FAQ / Common Issues
Guides
Troubleshooting
Mythic Add-ons
Compatible Plugins
API Information
Packs
  • Pins
Mobs
  • Mob Options
    • Display Options
  • Mob Levels
  • Mob Factions
  • Power Scaling
  • Damage Modifiers
  • Equipment
  • BossBar
  • Custom AI
  • Custom Kill Messages
  • Threat Tables
  • Immunity Tables
  • Templates
  • Vanilla Overrides
  • Extra: Disguises
  • Extra: ModelEngine
Skills
  • Mechanics
  • Targeters
    • Filters
  • Triggers
  • Conditions
    • In-line conditions
  • Metaskills
  • Placeholders
  • Variables
Items
  • Options
  • Attributes
  • Enchantments
  • Potions
  • Banner Layers
  • Firework
Drops & DropTables
  • Drops
  • DropTables
  • FancyDrops
Spawning
  • Spawners
  • Random Spawns
Stats
  • Custom Stat Options
  • Modifiers
  • Built in Stats
Technical
  • Math
  • Operations
    • Attribute Operations
    • Stats Modifiers
  • Particles Types
  • Audience
Examples
Useful Tips