Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> RMXP puzzle help needed, switch order puzzle help needed
henkhuizen
post Jan 2 2010, 02:51 AM
Post #1


Level 1
Group Icon

Group: Member
Posts: 7
Type: None
RM Skill: Skilled




I'm making a puzzle game with RMXP. I got the idea to make a switch puzzle: you have to step on the switches in the right order to solve it. but the problem is: i dont know how to make it without making hunderds of variables and switches.
can somebody help me making the puzzle made easier.

-sorry for bad english-
Go to the top of the page
 
+Quote Post
   
 
Start new topic
Replies (1 - 3)
rcGingerNinja
post Jan 2 2010, 03:24 AM
Post #2


Level 5
Group Icon

Group: Member
Posts: 60
Type: Developer
RM Skill: Skilled




You should be able to do this with one switch or variable with some careful thinking (or various other methods).

The simplest method to keep track of is using a single variable (remember a single variable can contain a multitude of different information, so it is quite flexible).

Let's say for example you have 4 chests, and you need to approach them in a certain order. When a user approaches the first correct chest, change a variable (for example a variable named CHEST_PUZZLE) to 1 (from 0, which should be it's default value), then when they get the second chest correct set it to 2 (and so on and so forth), if however they get the in-correct chest in the sequence, reset CHEST_PUZZLE back to 0 and close all the chest, or whatever is you want to do.

The individual chests can have a simple event that checks to make sure CHEST_PUZZLE is at the expected numeric value (meaning they have gotten chest(s) correct up to this point).

Of course it does not have to be a numerical value if memory serves me right, it can be a more meaningful value such as a string (CHEST_1_OK) etc etc.

I don't play too much with RPG Maker and as I am a programmer my ideas generally come from that experience so there may be limitations to my ideas as far as RPG Maker is concerned, but I am pretty sure the above is feasible and quite easy to do.

I do not have RMXP but RMVX and if you have that or a trial copy etc, I can probably create a basic example of the above using the RTP graphics and a small map, if you cannot follow my explanation.
Go to the top of the page
 
+Quote Post
   
Holder
post Jan 5 2010, 06:57 AM
Post #3


Spoilers.
Group Icon

Group: Revolutionary
Posts: 4,204
Type: Developer
RM Skill: Advanced
Rev Points: 250




Moving this topic to the RPG Maker XP section.


__________________________

 I'm running the Great North Run in September in aid of NACC. A condition my wife has in it's severe form.
Please sponsor me with whatever you can, thank you.
If you'd like to help spread the word please share the image and link to my fundraising page.

Go to the top of the page
 
+Quote Post
   
Unka Josh
post Jan 5 2010, 12:16 PM
Post #4


Level 32
Group Icon

Group: Revolutionary
Posts: 771
Type: Developer
RM Skill: Skilled




Well, let's see, here.

I'd say that you could do this pretty easily with two variables and one switch per trigger. (Trigger=floor switch=button=box=whatever.)

The switches are just used to record whether or not the trigger has been activated. They aren't self-switches because hey, you'd like to be able to reset the puzzle easily, right?

We'll call the two variables A and B.

Trigger #1 will, when activated, do the following:

1) Control Variables: Add one to A.

2) Conditional Branch: If A=1, add 1 to B. If A=2, add 10 to B. If A=3, add 100 to B. If A=4... you get the idea.

3) Activate the switch for this trigger so that you can't keep hitting it.

Trigger #2 will be like #1, but instead of adding 1/10/100/1000 to B, it will add 2/20/200/2000 to B, and so on for each trigger.

Thus, when you hit all the triggers (and you can use up to 9 with this method, which I hope will be enough for you, as that's something like 362,880 possible numbers generated), you'll have an up to 9-digit unique number that records the order of triggers that you hit. For example, looking at a 4-trigger number, if you hit the triggers 1-4 in that order, you'd get 4321.

So, at the end, you have an event page or conditional branch that is looking for the a variable B to equal 4321. You could even have it check other numbers, if you wanted to, and (for example) tell the player when the number's wrong and reset the puzzle, or send the player to different maps depending on the order they picked.

Was that reasonably clear?
Go to the top of the page
 
+Quote Post
   

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: 22nd May 2013 - 09:47 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker