Projectiles with potion effects

Started by francouo on

Topic category: Help with Minecraft modding (Java Edition)

Active 4 years ago
Joined Sep 2020
Points:
639

User statistics:

  • Modifications: 0
  • Forum topics: 5
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 8
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

Active 1 year ago
Joined Jun 2015
Points:
1277

User statistics:

  • Modifications: 10
  • Forum topics: 32
  • Wiki pages: 0
  • MCreator plugins: 1
  • Comments: 543
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?

Active 4 years ago
Joined Sep 2020
Points:
639

User statistics:

  • Modifications: 0
  • Forum topics: 5
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 8
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 

Active 4 years ago
Joined Dec 2019
Points:
966

User statistics:

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

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

Active 4 years ago
Joined Sep 2020
Points:
639

User statistics:

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

It's just what i did :(

Active 2 weeks ago
Joined Mar 2022
Points:
536

User statistics:

  • Modifications: 1
  • Forum topics: 11
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 15
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

Active 2 weeks ago
Joined Mar 2022
Points:
536

User statistics:

  • Modifications: 1
  • Forum topics: 11
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 15
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.

Active 1 year ago
Joined Oct 2021
Points:
693

User statistics:

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

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

Active 3 years ago
Joined Aug 2022
Points:
378

User statistics:

  • Modifications: 0
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1
 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.