Variable change depending on other Variable

Started by Hooti on Sun, 08/07/2016 - 03:43

Topic category: Help with MCreator modding

Last seen on 10:01, 19. Aug 2016
Joined Aug 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Variable change depending on other Variable
Sun, 08/07/2016 - 03:43

At the moment I have a variable which increases every time I right click this block. I want this to be treated as an 'experience' variable, and then when this variable reaches a certain number, change a different 'level' variable. So basically when the player reaches a certain xp, their level increases.

thank you

Last seen on 00:21, 11. Aug 2019
Joined Aug 2013
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
  • wiki contributor
  • moderator
I'm not using the MCreator's
Sun, 08/07/2016 - 10:24

I'm not using the MCreator's variable mangaer , but it should be something like this:
if(mcreator_VarListTestEnvironmentMod.experience <= SOME NUMBER){

++mcreator_VarListTestEnvironmentMod.level;

mcreator_VarListTestEnvironmentMod.experience = 0;

}

Last seen on 10:01, 19. Aug 2016
Joined Aug 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
RE:I'm not using the MCreator's
Mon, 08/08/2016 - 16:32

@#1 where do i put this code so that it is constantly checking the variables?