RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Variable Help

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 83
I am just really stuck here. I don't get variables at all, I found how to use switches off the Internet and it is quite easy. Once you get the hang of course. I decided to make a [demo] game with at least 5 minutes of gameplay. Then I found some other games off the internet made with the same RPG Maker [2003, not 2000 or XP] and they game had a lot more and yes they were games with at least five minutes of gameplay as well. I asked one of the owners how they did stuff like that and they always replied with either switches or variables. So I went around this forum scouring for Variable tutorials and this is the only thread that I found useful. http://rmrk.net/index.php/topic,33719.0.html. The others were questions about people having problems with Variables, not how to use them. So does anyone know HOW to use variables, set them up, what they do and and how do you make them activate.

****
kikiki
Rep:
Level 84
Hi
1) How to use them? There's lots of ways. Basically to represent any number
2) Set them up in 'Variables (event commands)
3) You can't exactly activate them... either you can display variables in messages or use them for passwords, or in the event.
Hi

***
Rep:
Level 83
I spent a lot of time looking up variable tutorials and the first thing that I found out was that they represent a number. The question is what 'can' the variables do? Are they different from switches? Like switches can move a event. Like, you can stop a event repeating itself by using a switch. The only example I've read about was the fish one. You have a rod and bait. For each bait you can catch one fish. I have in my database about 10 different fish. When one bait is taken away, I want one fish to be given to you RANDOMLY out of those 10 fish. None of the fish are more rare than one another, so you have a 1 in 10 chance to get each fish. That is basically the question, I didn't ask it I found it off the forums.

****
kikiki
Rep:
Level 84
Hi
Variables can be used in lots of ways, passwords, bank money, scores, anything that (possibly) has to do with numbars
Hi

***
Rep:
Level 83
No, sadly, I thought they only represented a number, not anything else, but I don't know how to 'use' them. Like when you click on Variable Operations.

It says:
Variable to Charge, I guess that is simple enough.
BUT I have problem on Operation, I don't get what set equal, add, etc means.

****
kikiki
Rep:
Level 84
Hi
Add equal and subtract mean that you can make the variable greater or smaller in value.
Hi

***
Rep:
Level 83
That isn't the main problem though.

Its Operand.
What can I do with:

Number [It tells me to set a number?]
Value of Variable
Value Stored in Index
Random Number between.
Item
Hero
Sprite
Other.

If you can point me out to some useful tutorials.

****
kikiki
Rep:
Level 84
Hi
I think in Item, Hero, Sprite, and Other, you can assign the variable to be any of those.
Number, Value, Value stored in index, and Random Number between, I don't know. My brother's laptop doesn't have rm2k installed sooo I can't help you(fully) now.
Hi

***
Rep:
Level 83
Thanks for your help, even though it was 'fully' help, I understand variables more now, but I still need to master the grasp. Thanks anyway.

****
kikiki
Rep:
Level 84
Hi
Thanks for your help, even though it was 'fully' help, I understand variables more now, but I still need to master the grasp. Thanks anyway.
Meh, I'm not really good at variables myself. So I might have posted misleading information. Best to look it up in rm2k/3's help file.
Hi

***
Rep:
Level 83
Well. I just have ONE more question. How important are Variables? Do Variables make up the whole game, or can they be replaced by switches or anything like that?

****
kikiki
Rep:
Level 84
Hi
Well. I just have ONE more question. How important are Variables? Do Variables make up the whole game, or can they be replaced by switches or anything like that?
Not THAT important. It's still useful, but I've hardly used any variables in my game.
Hi

***
Rep:
Level 83
Does your game have a demo or anything. I always thought you need to know all the aspects of RPG Maker 2003 to have a good game, if you game is progressing well, wouldn't that make variables a shortcut and not needed that much at all?

****
kikiki
Rep:
Level 84
Hi
Does your game have a demo or anything. I always thought you need to know all the aspects of RPG Maker 2003 to have a good game, if you game is progressing well, wouldn't that make variables a shortcut and not needed that much at all?
My game is complete. I see we're moving on to some other topic...

I shall talk with him via PM.
Hi

***
Rep:
Level 83
I see, well, thanks for your help, if you don't mind, send a link to your game from PM. I'd like to try it and see what a game with no variables can achieve.

****
kikiki
Rep:
Level 84
Hi
I see, well, thanks for your help, if you don't mind, send a link to your game from PM. I'd like to try it and see what a game with no variables can achieve.
I did use variables, but that was for a banking system.
So variables can be used sometimes to create systems in order to make your game a bit more interesting.
Hi

***
Rep:
Level 83
I see. A banking system is something to make the game interesting, Thanks for your help, again.

****
kikiki
Rep:
Level 84
Hi
I see. A banking system is something to make the game interesting, Thanks for your help, again.
GAH WAIT NO

how do i word this.... hmmm
SOME systems make your game interesting
others are just... there.
Hi

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Variables are very important, especially for RM2k3 where scripts do not exist.

Basically, for all complicated and most simple event systems, variables are going to be required.

Want an ABS - you need to know where the enemies are and where the hero is - variables.

Want to make a menu - you need to be able to move a cursor, which means you need to know where that cursor should be and position it dynamically; you can do it with variables.

Try looking for Yami's variable tutorial in the RMXP Tutorials Database. It should help.

I also wrote a tutorial on Event Commands which includes a section on variables and explains what those options do. It should also be in the RMXP Tutorials Database

***
Rep:
Level 83
Thanks, but does RMK3 differ from RMXP??

********
Resource Artist
Rep:
Level 94
\\\\\
Project of the Month winner for June 2009
Basically, yes.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
But variables are pretty much the same.