Adding delays to potion effects

Started by Steinzermalmer on

Topic category: Minecraft mod ideas exchange

Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Adding delays to potion effects

Hi,

I wanted to add an effect called Venom which after a few seconds gives you bad effects and after a few nother seconds it damages you. Similar to how in real life e.g.; snake venom doesnt kill you instantly, but weakens you and kills you after some time if you don't get the cure. I can't figure out how to do this delay and in tutorials on yt ppl only have block delays or global timers. I want this effect to be applied when a scorpion or another poisonous creature I made attacks you. I'm pretty sure I don't want to use the on pkayer update tick tho because wouldn't that then even be when you are just playing normally? Can anyone help me?
Thx

Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
so when they first get it…
Thu, 02/25/2021 - 17:54

so when they first get it make a varbile increase by one every tick on another procedure, then if varible is over 50 (4 seconds) it deals damage to player, else it gives weakness

Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i know im definitly late…
Tue, 12/19/2023 - 01:42

i know im definitly late but

when effect expires then add the potion effect you want unless you have the antidote either in main hand or if it adds a effect if you have a effect