[TUTORIAL] How to calculate Percentage inside MCreator without Coding

Started by SparkleArts on

Topic category: User side tutorials

Last seen on 14:47, 18. Apr 2024
Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[TUTORIAL] How to calculate Percentage inside MCreator without Coding
Sat, 03/06/2021 - 20:29 (edited)

Today I want to show you how to do percentage attack damage without code.

You can add the condition Amount to the global triggers "Entity attacked" and "Before Entity is Hurt" with the block under Advanced Number Dependency and add a condition "amount". (For the global trigger "Player deals critical hit" you can add the number dependency "isvanillacritical" and "damagemodifier")

It should look like this:

Custom Number Dependency in MCreator

To get a percentage you have to multiply the attack damage using the Number Dependency with your percentage divided by 100.

Here is an example of a percentage calculator and my calculation:

With Percentage Calculator
With Percentage Calculator

 

Without Percentage Calculator
Without Percentage Calculator

"*" = multiplication
"/" = division

With this you can make easy Percentage Calculation.

Edited by SparkleArts on Sat, 03/06/2021 - 20:29
Last seen on 15:17, 18. Apr 2024
Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I cannot find the block you…
Mon, 11/15/2021 - 19:35

I cannot find the block you're using in the image, doesn't seem to be under the advanced tab

Last seen on 14:47, 18. Apr 2024
Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Mariano Argüello in Advanced…
Tue, 11/16/2021 - 17:01

Mariano Argüello in Advanced it should be the Block that have the same Color as the Math Blocks with the name "dependencyName".