Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> [VX] Switch Puzzles 2, Difficulty: Easy; Work: Medium
Shaddow
post Aug 30 2012, 10:37 PM
Post #1


The Eventer Inventor
Group Icon

Group: Local Mod
Posts: 1,250
Type: Event Designer
RM Skill: Masterful
Rev Points: 90




Hey there RRR! I'm back with another tutorial already! Why, you ask? Well...because the last one I made, while useful, wasn't actually what was requested. Why? Well because sometimes I'm not very bright. There, I said it!

Anyways, this is another puzzle switch tutorial, but more in the vein of a rubix cube, though simpler. This puzzle will cause a switch to change color, along with the switch next to it. The goal is to match all the colors to one pre-defined color. For the sake of the tutorial, I used yellow as the color you'd like to reach. Anyways, on with the tutorial!

The first thing you are going to create is switches, make as many as you want, to keep things simple, I made four and made each one a different color.

Now for each event you will create a number of pages equal to the amount of colors you will cycle through (Again, I used four). On each of these event pages you will create something rather simple, but a bit time consuming. You must make a variable for each switch you are going to use. Now you will have a button pressed action for the event. What it will do is increase the variable of it's own color by 1 as well as the variable of any colors next to it.

You will then repeat this for each event page. Though for each page after the first you must make a requirement of the variable for that event, and have each page require one higher variable. What this will do is cause it to change event pages each time the variable goes up, if that's pushing this event or the one adjacent to it, it will have the same result.

You can now repeat this process for each event, make sure to have each event start on a different color, though you will want to keep the event pages identical in style to the first one, but with variables that match that event and the ones it is adjacent to.

Now you ask, "But how does it go back to it's default color?!" Why, that's where your safety net event comes in! You will make a parallel process event that has several conditional branches in it. You will set each of these conditional branches alone, and have them check for each variable, once that variable equals a number higher then the amount used in the event pages, (In my case 4), you will set that variable to 0, causing it to revert to it's default color! Simple, yes?

Now in that same event you will have a longer conditional branch string. You must make each one check to see if the event is the variable for the color you want them all to be(In my case yellow), so this will require you to check the event pages on each of them and see what the variable is required for that color.

Then you set the first conditional branch to check if it's the right variable, if it is you check the next one and so on, until it's complete. If it is not the right variable, set no else, as it will simply continue. Now on the last event page, when all of them are the correct variable you will create one final variable(I named my solution) and set it to 1, do not add as the parallel process will just keep adding it as long as the colors are correct.

On the chest or door or such you will put a conditional branch of that variable, requiring it to be set to 1, if it is, your chest will open, if it is not it laughs at you or whatever you had devised.

Phew, that was a lot of words! You've all been troopers, especially since there was no pictures in this tutorial. So. Here is a puppy:


Along with a demo Here


__________________________




I support these projects! -------------





Go to the top of the page
 
+Quote Post
   

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 19th May 2013 - 04:11 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker