Provided dependency doesn't work (Source entity, Entity attacked global trigger)

Started by Mauviette on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Provided dependency doesn't work (Source entity, Entity attacked global trigger)

Hello,

I am trying to make a potion effect that damages any entity attacking the player.

I started by creating the effect, then a procedure (here is the code): 

https://ibb.co/MDn57nY

At the bottom right of my screen are the provided dependencies :

https://ibb.co/tQPJcvq

But the source entity dependency is not detected, so it's dependency is missing (FireThorns procedure)

https://ibb.co/kXCZ21R

Am I doing something wrong?
Thank you

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hello there,  I think that…
Wed, 06/22/2022 - 10:13

Hello there, 

I think that the source entity dependency is not provided by the place that you put it in (when effect started/applied). That's why it don't accept the procedure. 

Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you for your reply, I…
Wed, 06/22/2022 - 11:05

Thank you for your reply, I may be wrong but Isn't the global trigger supposed to provide dependencies?

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So the global trigger…
Wed, 06/22/2022 - 11:54

So the global trigger provides dependencies to the procedure, that is true and that part of the implementation is fine. However, when you call a procedure from the element-specific triggers (like in the third image), the only dependencies that are provided are the ones that are shown on that screen - which are entity, x, y, z, world, and amplifier - which is why you cannot add the procedure to the trigger in the third image, since it does not provide the "source entity" dependency.

Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Then how do you make it work…
Wed, 11/30/2022 - 18:29

Then how do you make it work ? I need to know because I have something similar to do

Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The Entity is the Source…
Mon, 03/27/2023 - 08:18

The Entity is the Source Entity. It means that the Entity that has this Potion Effect is it applied.

What you can do is to make a blank Potion Effect and then a Procedure with the Entity attacked Global Trigger.

Then checks in there if the Event/target Entity has the Potion Effect and then you can use the Source Entity to damage the Entity that attacked the Event/target Entity that has the Potion Effect.