-
Notifications
You must be signed in to change notification settings - Fork 11
Energy Bars
Energy Bars can be easily added to powers to indicate a power level, energy, or whatever. To add one, just add this to your power json:
"energy_bars": {
"energy_bar_name": {
"max": 500,
"auto_increase_per_tick": 1,
"color": "#fc8803"
}
}
energy_bar_name
must be a unique name of your bar so you can reference it later.
max
is the maximum value of what your energy bar can hold. You can dynamically change this with a command if you desire.
auto_increase_per_tick
(optional) can be used if your energy bar is passively charging up.
color
(optional) is the color of your bar, duh.
With this set up the bar will appear, in the next section you can see how you can use.
The most common usage for energy bars will be depleting them when using an ability. You can simply add this to an ability to do so:
"energy_bar_usage": {
"energy_bar": "energy_bar_name",
"amount": 10
}
There is also a condition which you can add to make sure the energy bar has enough energy:
"conditions": {
"unlocking": {
"type": "palladium:energy_bar",
"energy_bar": "energy_bar_name",
"min": 500
}
}