Need help with variables

Started by Tommeh on

Topic category: Help with Minecraft modding (Java Edition)

Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Need help with variables
Mon, 02/26/2018 - 20:45 (edited)

I cannot figure out how variables work and i cannot find a wiki page about it and i also fail to make custom commands which is the only reason why i am using this

Edited by Tommeh on Mon, 02/26/2018 - 20:45
Joined Jan 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm not sure exactly what…
Mon, 02/26/2018 - 23:19

I'm not sure exactly what you need, but I will just go over how they work for you.

 

A variable in computing is either a:

  • String - this means a set of letters.
  • Number (Sometimes called an Integer) - this means just a number.
  • Logic (Sometimes called a Boolean) - this is either True or False.

In MCreator, we will mostly be working with either Number or Logic variable types.

To create a Variable, go to your Workspace, and you will see an icon called 'Variable List' at the top with a little '(x)' symbol for the picture - click on this.

Click the green '+' icon at the top left to create a new variable. You must choose one of the 3 Variable Types mentioned above.

Fill in the 'Name' box with a name for your variable.

Fill in the 'Initial Value' with something, depending on what Variable Type you have chosen.

When you have finished, click 'Add', and there you have it, you've successfully created a Variable!

 

Variables are used in the events sections of items, blocks, etc...

In order to help you with using your Variable in an instance, I would need to know what you are trying to achieve.

~ Hope this helped!

 

Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I do not appear to…
Tue, 02/27/2018 - 16:24

I do not appear to understand the variables correctly, the first and most simplistic things i need are 2 commands with their own permission node that open a browser page which have their own permission node but idk how to give a command a permission node and it always tirggers regardless of the command that players use.

Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Does this forum have an edit…
Tue, 02/27/2018 - 16:25

Does this forum have an edit option btw, it whould be extremely usefull

Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Would*…
Tue, 02/27/2018 - 16:26

Would*

And the notifications don't work either