how would make make a sword give targeted entity potion effect on hit

Started by Christianfirecup1 on

Topic category: Help with modding (Java Edition)

Last seen on 11:44, 10. Jan 2022
Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how would make make a sword give targeted entity potion effect on hit
Mon, 11/08/2021 - 03:31 (edited)

If anyone could tell me what's wrong with this procedure it's supposed to give slowness to the target but it doesn't seem to do anythingthis is image 1image 2

https://prnt.sc/1ypq7wq

https://prnt.sc/1ypq2zz

Edited by Christianfirecup1 on Mon, 11/08/2021 - 03:31
Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
sorry to tell you this, but…
Mon, 11/08/2021 - 04:17

sorry to tell you this, but everything is wrong. first of all you do not not an if statement, and you used source entity instead of event target entity 

so remove all of your "procedure" (if we can call it that) and put this

add potion effect for: 100000 tickstype: EFFECT to event target entity 

 

Last seen on 11:44, 10. Jan 2022
Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
sorry I was trying to see if…
Mon, 11/08/2021 - 05:20

sorry I was trying to see if the source entity would give the player the effect to see if it was the code messed up and it still didn't work thanks for the tip

Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
so it worked?
Mon, 11/08/2021 - 05:49

so it worked?

Last seen on 11:44, 10. Jan 2022
Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
cant test it tonight but…
Mon, 11/08/2021 - 05:50

cant test it tonight but will try tomorrow