[Solved]timing a part of a procedure

Started by Freddy101 on

Topic category: Help with modding (Java Edition)

Last seen on 03:35, 20. Jul 2024
Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[Solved]timing a part of a procedure
Sun, 09/24/2023 - 06:11 (edited)

hello ive made a procedure to dash and then add a potion effect to a mob in the surrounding area. The only problem is the dash and potion effect applicator activate at the same time so it will apply the potion effect to a mob where I started the dash instead of where I ended it. I've tried using the wait block but that doesn't work it just applies it at the start of the dash but doesn't effect the mob until the ticks have passed

Edited by Freddy101 on Sun, 09/24/2023 - 06:11
Last seen on 05:10, 3. Dec 2023
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can you share a screenshot…
Sat, 09/23/2023 - 00:33

Can you share a screenshot of your current procedure?

Last seen on 05:10, 3. Dec 2023
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Not exactly your issue but I…
Sun, 09/24/2023 - 00:00

Not exactly your issue but I notice you are applying a "for each" and a "get nearest entity" so your code is saying for each entity iterator that it finds, affect invisibility to an iron golem that is within 4 blocks of the entity iterator. So you wouldn't actually be directly affecting the iron golem. If you want it to specifically affect iron golems, add a condition, like your "not event/target entity = entity iterator"

 

The main issue was that you are using for each entity at x y z (this is the x y z position from when the procedure begins) since you moved the player, you need to get the x y and z of the player. I re-wrote your procedure. This works as intended. You may want to increase the 6 block radius, as this is fairly small, but that's up to you.

 

https://imgur.com/Bp8pdmS 

Last seen on 03:35, 20. Jul 2024
Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
thanks so much, man this is…
Sun, 09/24/2023 - 06:11

thanks so much, man this is great means a lot especially remaking it considering I'm a noob