[TUTORIAL] How to calculate Percentage inside MCreator without Coding

Started by GamesofFreak on Sat, 03/06/2021 - 20:26

Topic category: User side tutorials

Last seen on 04:28, 25. May 2022
Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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 GamesofFreak on Sat, 03/06/2021 - 20:29
Last seen on 04:24, 12. May 2022
Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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 04:28, 25. May 2022
Joined Feb 2018
Points:

User statistics:

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