Started by
francouo
on
Topic category: Help with Minecraft modding (Java Edition)
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
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?
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
Make the projectile so on hit it does that. It’s a trigger.
It's just what i did :(
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
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.
HEEEELP PLEASE! I can't make my projectile work!
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.)
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:
I'm not sure if the extra if here is necessary, but I figured it couldn't hurt to have it just in case.