#Mana bar from ISS (1.20.1)
22 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
@elfin solstice I remember you having some experience with no mana regen, how did you achieve that?
set irons_spellbooks:mana_regen attribute to 0
☝️
You mean I nead to write code that makes this attribute always turned to 0?
ye
Got it, tnx
So, first things first, I need to make an event thing?
Just like in example with crafting, but based on player entering the world or something?
How does it looks like?
And do I need this setting thing from the same script example?
Ahhuuuu
So now I need to do something with player.logged_in and out?
So where I have to put it to?
you can do something like this
PlayerEvents.tick(event => {
event.player.modifyAttribute('irons_spellbooks:mana_regen', // attribute ID
'zero_mana_regen', // attribute modifier ID
-100, // this will reduce mana regen by 10,000 percent. it doesn't matter if it goes negative.
// if mana regen goes below 0, it still acts like 0.
'multiply_total' // math operation. we're using multiply_total so that it counts even the other attribute modifiers.
)
})
goes in server scripts btw