How to make an effect that deals damage every 10 seconds but not kill entity? (like poison)

Started by Toibithieunang on

Topic category: Help with Minecraft modding (Java Edition)

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make an effect that deals damage every 10 seconds but not kill entity? (like poison)

Any help would be appreciated.

Sorry for bad English.

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
this is the simplest way to…
Mon, 07/18/2022 - 11:50

this is the simplest way to do this. if you want it to deal 3 damage, then change the number 0 to the damage you want -1.

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
get the health of thw entity…
Mon, 07/18/2022 - 12:36

get the health of thw entity and if its at your threshold then don't deal damage els deal damage put all this in a wait statement

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
heres some pseudo-code :-   …
Mon, 07/18/2022 - 12:41

heres some pseudo-code :- 

 

wait 200 ticks:

        if not {[get health of 'event/target entity '] == 1}:

                 deal damage of type 'generic'

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
note that there is a NOT…
Mon, 07/18/2022 - 12:42

note that there is a NOT there before teh condition

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
And you're English ant that…
Mon, 07/18/2022 - 13:05

And you're English ant that bad ;)

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
in fact its pretty good
Mon, 07/18/2022 - 13:06

in fact its pretty good

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm tried, but when a zombie…
Tue, 07/19/2022 - 01:30

I'm tried, but when a zombie hits me, The effect will wait 10 seconds and rapidly deal damage to me and I died from being killed by the effect.

Here is the proceduce:

Proceduce