Help with an equation

Started by Thegamerx100 on Tue, 08/25/2020 - 10:31

Topic category: Help with modding (Java Edition)

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

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Help with an equation
Tue, 08/25/2020 - 10:31

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 07:04, 27. Oct 2020
Joined Jun 2016
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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 07:04, 27. Oct 2020
Joined Jun 2016
User points:

User statistics:

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