Is this procedure correct?

Started by DarkWolf on

Topic category: Help with modding (Java Edition)

Last seen on 00:46, 5. Dec 2023
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Is this procedure correct?

I'm about to publish a mod with a boss, and I want to add the ability for it to have two variations of melee attacks and one ranged attack. I came up with the idea of creating a randomizer for the melee attacks. So, using a procedure, I check if the generated number is greater than 0.5, then it performs attack animation number 1, and if it's greater than 0.4, it performs attack animation number 2. As for the ranged attack, I thought about determining it based on the coordinates of the target. If the target is close in the X, Y, and Z axes, then it performs the melee attacks, but if the distance in any of the axes is greater, it performs a ranged attack. However, I don't understand why, during gameplay, it's not performing any attack animation. I believe I made a mistake in the procedure. I hope you can help me with this issue...

 

https://drive.google.com/drive/folders/1aQkjrUqwnVI9ZK2j24qd2MCmYzg3kyra?usp=sharing

 

Here is the procedure I have created for you to review and let me know about any errors.

Last seen on 00:46, 5. Dec 2023
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I have already corrected the…
Sat, 05/20/2023 - 02:54

I have already corrected the procedure to add a ranged attack thanks to Kyoukster!