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

Started by Mauviette on

Topic category: Help with modding (Java Edition)

Last seen on 19:30, 7. Apr 2023
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

Last seen on 07:34, 25. Oct 2023
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. 

Last seen on 19:30, 7. Apr 2023
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?

Last seen on 00:46, 5. Jun 2023
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.

Last seen on 18:17, 3. Jul 2023
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

Last seen on 19:25, 27. Mar 2024
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.