If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
Basically, in RPGM3 variables are storage spaces for numerical values, which can either be used as conditions to activate events, or, more commonly, used for val-conditional branches. A good example of val-conditional branches in relation with variables is King Sample's code in DBH. Depending on the value of the "Stamp" variable, he tells you how many stamps you have.
You can dodge around this situation by changing modes for events, rather than variables, but val-conditional branches are better if you need an event to change what every character and event does all at once.
There's a few other threads in this forum about variables, so don't be afraid to check around.
Alot of people on here are members of the RPG Maker Magazine forum too, and I know there is a RPG Maker 3 Variable Guide there if that helps.
Take Care.
" I am the way, the truth, and the life. No one comes to the Father but by me." -Jesus
Mabey I'm some kind of moron but I'm having a real hard time wraping my head around variables. I'll give you an example of what I'm trying to do.
I want to be able to create a storyteller dialogue that occurs when the player gets to the bottom of a set of stairs, but (here's the part that I think I need variables on) I only want it to happen the FIRST time the player comes down the stairs NOT EVERY TIME. Any help would be great.
you don't really need variables to do that.
Just use "display off" at the end of the event.
thats the way I do it.
but, there is a lot on thius site about using variables, you will need to learn
if you want any sort of complexity to your design.
if you did this using a variable
set up an auto event using(for example) shared var 1=0, you'll see it under event conditions, now when you walk over the invisible event it will trigger.
At the end of the event code that contains your storyteller
modify var 1 to equal 1. obviously the event will not trigger now because the variable is not 0. this is really an inefficient way to set things up though, but I just wanted to give you an example on using variables
or
you could just make an empty mode and use "modify mode" to send the event to that mode, people do it that way.
but the easiest
display off/"whatever you named your event"
variables aren't really that hard, I had no idea what anyone was talking about
at first, but then it just clicked and I literally said out loud,"oh, man I'm dumb".
but, there is a lot on thius site about using variables, you will need to learn
if you want any sort of complexity to your design.
I've been looking around and I've seen a few different people say this same thing, but every tutorial or explination I read just makes me more confused on this subject. It vexes me b/c I understand everything else about the game it's just these stupid variables.
Are you supposed to use them if you want to make an NPC say three different things, or do you just use modes for that?
I just don't fully understand their usefulness.
well, you could do it by modes, if you wanted to say 3 statements in
succession, but if you wanted the npc to have Access to all the statements at once you'd set it up like this
example
val-cond branch, pick 4 options
shared variable 1
shared var 1 = o
shared var 1 =1
shared var 1=2
shared var 1=3
option1(shared variable 1=0)
Display message You still haven't found the hot dogs!
now, in your game, when a plyer comes across a hot dog(or weiner if you please You would increase the shared var 1 +1, that would trigger the
second option on your val-cond branch.
option 2(shared variable1=1)
display message: Yes, it is glorious you have found a hot dog!
now option 3 and 4 would be the same way and the great hot dog caper will be solved!!!!
I hope this helps
now I'm hungry!
edit: now, if you wanted more than 3 hot dogs to be found, all you have to do is stack them 1 after another(val-cond branches not hot dogs!). the game will go through them all until it finds the current value.
Comment