Adding delays to potion effects

Started by Steinzermalmer on

Topic category: Mod ideas exchange

Last seen on 09:09, 2. Mar 2021
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

Last seen on 19:15, 17. Mar 2021
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

Last seen on 06:49, 31. Dec 2023
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