Variable's value is increasing incorrectly

Started by Seedorf on

Topic category: Help with MCreator software

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Variable's value is increasing incorrectly

Hi, I've tried to make an exp system.
So I made a number, player persistent variable that stands as exp. When an entity is killed by a player (in that case, Pokemon, cause I'm making it with pixelmon mod) it drops a placeholder item that when "in inventory tick" should be instantly removed from the player in order to add +5 to exp variable according to its procedure. But the problem is that, variable changes are very strange. Sometimes, it works and I get normally 5 exp, but sometimes I get more than that, for example, 6 or 7. I wonder if it has something to do with the "inventory tick" calculation.

Item procedure trigger:

Procedure:

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
PS. PK is nothing about exp,…
Thu, 09/28/2023 - 22:38

PS. PK is nothing about exp, this variable is just a counter for entities killed, so ignore it.

Joined Feb 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Im having the same proble,…
Tue, 09/24/2024 - 17:26

Im having the same proble, everytime i rightclick a block, it should increase variable by 1, then i shoull be able to rightclick entity with variable 5, but it only works when the variable is up to 8, not 5.