Help with an equation

Started by Thegamerx100 on

Topic category: Help with modding (Java Edition)

Last seen on 10:36, 31. Aug 2020
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help with an equation

What equation is necessary to make that for each level of an enchantment (up to level 5) the number of a variable is reduced by 10%?

Last seen on 17:49, 25. Mar 2021
Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think it could be Set…
Tue, 08/25/2020 - 11:24

I think it could be

Set variable to {(get variable) - [(get variable / 10) * enchantment level] }

Last seen on 17:49, 25. Mar 2021
Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
And you could have a…
Tue, 08/25/2020 - 11:25

And you could have a condition which checks if the enchantment level is equal or greater than 5, it would simply halve the variable rather than executing the previous operation