I’m new to workshop and i was curious about editing variables. For some reason i can’t find them in code. I mean i do but i can’t “recode” them if it makes sense. For example when i look in other people codes there are a lot of variables that but i can’t find a place where all these variables are being stored other than edit variable names. The only thing i can do with them is rename them. That’s it. Maybe that’s just how variables work or i misunderstood something?
There are actions called “Set (Player/Global) Variable” that you use to store your number, string, array, etc. It’s not so much a table where the variables’ contents are edited, as with the names.
Hey, glad to see you’re taking interest in the Workshop!
You probably already knew this, but just to recap, any global variable applies to the entire game instance as one value, and of course, player variables apply to each individual player who’s in your match, with their own separate values.
• In the Workshop editor, you can access the names of your variables and subroutines at the top of your Script. Your variables can be named anything, although they can’t have spaces, and multiple variables cannot have the same name. If you run out of variables, you can always make more from the variable menu.
• Actually manipulating variables is done through Rules. When you have a Rule, you can use several actions to change up your variables. Some of those actions include SET GLOBAL/PLAYER VARIABLE, MODIFY GLOBAL/PLAYER VARIABLE, CHASE GLOBAL/PLAYER VARIABLE AT RATE, and CHASE GLOBAL/PLAYER VARIABLE OVER TIME.
Your variables can contain any type of information, such as players, vector positions, built-in arrays of values such as the connected players or all the heroes in the game, custom arrays set up by you, HUD text, and plenty more.