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

Started by Mauviette on Wed, 06/22/2022 - 09:58

Topic category: Help with modding (Java Edition)

Last seen on 13:37, 4. Aug 2022
Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Provided dependency doesn't work (Source entity, Entity attacked global trigger)
Wed, 06/22/2022 - 09:58

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 09:03, 13. Jul 2022
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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 13:37, 4. Aug 2022
Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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 02:47, 17. Jul 2022
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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.