#lowering player max health depending on how long the mob effect has been applied

7 messages · Page 1 of 1 (latest)

naive kettle
#

so the longer it has been on the lower the max health, it needs to reset to normal max health ofcourse after, I know I can grab the entity age but that's not exactly the age of the effect.

  event.create('redsmod:withdrawal')
  .modifyAttribute('minecraft:generic.movement_speed',
    "b80f8b5e-1b28-11f0-9cd2-0242ac120002",
    -0.1, 'multiply_total').color(Color.RED)
    .effectTick((entity, lvl) => {
      
    }) 

I want it to be capped at like 3 hearts at maximum time. (which will be a fixed number)

gritty swallowBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

naive kettle
#

maybe add persistent data to the player for each tick?

fast pagoda
#

I think it's easier to achieve this through a server script than doing it in effect registry.

#

And maybe keep track of "last start time" of the effect instead of continually increasing the tick number.

#

Like, you can ,for 100 ticks, check how many ticks have past since the last start time with playerevents.tick and set player's maxHealth according to the tick difference.

naive kettle
#

I figured it out