I’ve been developing some games on modd.io for a while now, and I’ve always come across these “variables” or “Global variables.” I’ve never had any programming experience before, but I’m certain that this element can greatly assist me in game development. However, I don’t know what these “variables” are or how to use them… Can someone explain to me in an easy way what they are and how to use them?
1 Like
A variable is something that stores information. You can set a variable to a value at one part in your code and use that value in a different part. In Modd.io, you can create variables of different data types to store different kinds of information. Some commonly used data types are “number” which stores only numbers, “string” which stores strings (like text/words), and “boolean” which stores true or false.
Some uses for variables are using number variables for counting:
Or using string variables to put a dynamic value in a dialogue:
1 Like