I'm making a system using the "Number Input" command, where you enter a four-digit code received on a physical card (this is one of my sandbox games that I'm making for myself to play on YouTube). Each code unlocks exclusive items and characters to use, and I'm even designing blind packs of these cards just so Helen Henny can open them on camera.
There's just one issue. The "Number Input" command needs a variable, and I am absolutely clueless on how they work. I checked the help file and I couldn't find anything coherent that my Autistic brain could clearly understand (yes, I have Autism), so here I am.
Can someone please explain what variables are, how they work, and how to use them? I'm trying to create this feature without having to use a plugin, so any help is much appreciated. Thanks in advance.
You can think of a variable as a sort of box. It can hold pretty much anything. Numbers, letters, sentences, arrays, you name it.
You can use a variable whenever a simple switch won't quite cut it. In your example, the number input will save the number that the player put in into that box (the variable) and keep it there until you put something else in.
That way you can then for example make a conditional branch where you check if this number inside that variable is bigger than or smaller than or whatever else you want to check that number for.
So with your code system, you could check "if Variable "Code input" = 1234 unlock this character, else if variable "Code Input" = 1235 unlock this other character" and so on.
Hope that makes it more approachable.
This was so helpful! I'm saving this information for future reference... I may even get to use variables regularly in the future if I get good with it.
I'm going to play around with it a little. Thank you!
That would be a great upgrade. I'm leaving this open for now in case anyone else has something to add.
The simplest example of a variable I can think of would be having the player collect apples. Naturally you don't want to turn on a different switch for every apple, right? So you use a variable. Whenever the palyer picks up and apple, you do "Variable Apple +1". And the npc who you need to give the apples to will then have a conditional branch "If Variable Apple = 10 say "That's enough apples!" else "Sorry, I'll need more of dem apples."
By the way, in case it makes you feel better, when I first used RM, variables went over my head. I just couldn't get it until a day or two later when I woke up and it just clicked. Was a weird experience, but I laugh about it now.
I'd love to, but VXAce doesn't work on my Mac (though I do have it. I bought it for my PC before it broke and left me with just a MacBook Pro). Would have been awesome though.