Main Menu
  • Welcome to The RPG Maker Resource Kit.

Variable switches

Started by MagicNinja, March 09, 2008, 07:00:01 PM

0 Members and 1 Guest are viewing this topic.

MagicNinja

I cannot get these to work in VX. Maybe it's just me though...

Anyway, I have a door in my game that unlocks when you kill 15 skeletons. I have everything set up. When you kill one, it has a +1.  But for some reason, the door does not unlock. I've been dicking around with this for about a week now and I'm fed up with it. Can someone give me a complete run down of how variable switches work?

Or better yet post a link to a place where I can download the help file or something!!

Zylos

Controling variable is pretty simple. I'll give you a brief rundown.

In the control variables page, you first choose the variable you want to alter. Use single for changing single variables and batch for changing multiple variables. You then chose an operation, like on a calculator. "Set" directly changes the chosen variable to the operand. The rest should be obvious; "Add" adds, "Sub" subtracts, and so forth. Next you chose and operand, or what you want to alter your variable with. For example, if you wanted to add 15 to your variable, you would choose "Add" as the operation, and set operand as constant 15. Most of it you'll be able to easily catch on as you play with it a little more.

Now, for your situation, it will go something like this. For each skeleton you kill, use the command Control Variables. Select the proper variable, click ADD under operations, and make the operand constant one.

For the door event, make two event pages: first with the door locked, and the second with the door unlocked. On the second page, where it says conditions, select the variable you chose and set the bottom number to 15. This way, you can't run that event page unless the variable is 15 or more.

Hope this helps.




MagicNinja

Thank you so much for the help!

It was my own stupid error. I had it set to a constant 0 instead of a 1.
(I know I'm an idiot  ;D)

marty2008

Hey nobody's perfect atleast you tryed! Always learn from mistakes! Its what experamenting is all about. It is nice to have people help other people with their questions in their projectss.
"If you build it, they will play it"