Projectiles with potion effects

Started by francouo on

Topic category: Help with modding (Java Edition)

Last seen on 20:50, 16. Dec 2020
Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Projectiles with potion effects

I made a weapon that fires wave-style projectiles (I even managed to give the bullets a 3d model), and I would really appreciate if someone would tell me how I can make when the bullet hits an entity, it is given potion effects. I did a procedure in When bullet hits entity and I put Add potion with level ... (their respective values), but when I fire the effect it is given to the entity and the player TOO. If anyone can help me thanks: D

Last seen on 14:00, 14. Nov 2023
Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Please tell me your MC…
Thu, 10/15/2020 - 06:30

Please tell me your MC version and MCreator version.
Try to only add the potion effect to "Event/target entity" and not "sourceentity". Could you show me your procedure?

Last seen on 20:50, 16. Dec 2020
Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hello, sorry for the delay…
Sat, 11/21/2020 - 05:02

Hello, sorry for the delay in the answer, I was very busy these days. The mod is in version 1.15.2 of minecraft, the potion effect is set for the Event / target Entity and it doesn't work anyway. The procedure is very simple: Add potion with level 1 - duration 60 - ambient false - particles false to Event/target entity - type Slowness (i repeated that with another potion effect)
Thank you 

Last seen on 23:41, 3. Jun 2021
Joined Dec 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make the projectile so on…
Sun, 11/22/2020 - 16:21

Make the projectile so on hit it does that. It’s a trigger. 

Last seen on 20:50, 16. Dec 2020
Joined Sep 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It's just what i did :(
Mon, 11/23/2020 - 04:05

It's just what i did :(

Last seen on 23:50, 21. Mar 2024
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Has anyone figured out how…
Sun, 05/22/2022 - 22:55

Has anyone figured out how to make projectiles not give you to effects as well? When the entity is hit it works just fine but if you miss then it gives you the effects. Help... please

Last seen on 23:50, 21. Mar 2024
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Actually sometimes it gives…
Sun, 05/22/2022 - 23:04

Actually sometimes it gives you the effect even when you hit the entity.

Newest Version of Mcreator in 1.18.2
it has event entity and not source as well.

Last seen on 15:18, 21. Oct 2023
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
HEEEELP PLEASE! I can't make…
Mon, 06/27/2022 - 15:03

HEEEELP PLEASE! I can't make my projectile work!

Last seen on 10:00, 30. Aug 2022
Joined Aug 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
 Hi so I was having this…
Wed, 08/24/2022 - 00:20

 Hi so I was having this exact same problem and the way I solved it was:

 

For the potion effect, I added this to the "On effect active tick" trigger:

The important part is the "If is Event/target entity (sub)type of Mob Entity", this ensures that the effect can only be applied to non-player mob entities Putting whatever you want your spell effect to be within this if statement will cause it to only affect mobs. (In this case I made it so they can't move, kinda like a freeze effect.)

code sample

 

And then afterwards (sorry this is for a ranged weapon but it should have a similar trigger on swords) I put this in the "When Projectile hits living entity" trigger for the weapon itself:

weapon code sample

I'm not sure if the extra if here is necessary, but I figured it couldn't hurt to have it just in case.