The RPG Maker Resource Kit

Other Game Creation => Program Troubleshooting => Topic started by: Voyevoda on August 27, 2007, 03:27:43 AM

Title: [RESOLVED] Character creation event (RMXP)
Post by: Voyevoda on August 27, 2007, 03:27:43 AM
   I'm currently working on a character creation event in which the players class is chosen by answering a series of questions each answer awards the player points in favor of a particular class depending on their answer.
  My problem in the that a conditional branch only lets you compare one variable to one other variable when i need to compare one against four other variables. does anyone have any suggestions short of creating a new variable for each class that will add up the points of all the other classes to compare against in a conditional branch?
any help will be greatly appreciated.
Title: Re: Character creation event (RMXP)
Post by: modern algebra on August 27, 2007, 05:05:52 AM
Well, you could make each option add a certain amount to a single variable. In other words, set one variable up.

Variable = 0

Then for the questions, as a result of the answer, add to that variable a special amount representative of what class that option best represents.

To show this, let's take a simple case.

Say, there are three classes (thief, fighter, mage), and three questions (answers yes or no).

Let's say that if the final variable result is low, say below 5, then the player is a thief, if it is between 5 and 10, he is a fighter, and if it is above 10 then mage

Then for the questions:

Are you sneaky?

Yes: Add 1 to the variable

No: Add 4 to the variable

Are you virtuous?

Yes: Add 1 to the variable

No: Add 4 to the variable

Are you smart?

Yes: Add 4 to the variable

No: Add 1 to the variable

Thus, if you answer [yes, yes, no] the variabale is 3, and so you are a thief. If you answer [no, no, yes] you are a mage, and if you answer any other combo you are a fighter.

Obviously, you'll need to select what is added to the variables dependent on answer more discriminately
Title: Re: Character creation event (RMXP)
Post by: Voyevoda on August 27, 2007, 06:30:14 PM
Thanks that solved the problem.
Title: Re: Character creation event (RMXP)
Post by: Inferno on August 28, 2007, 08:13:51 AM
see i whould help u but i not good at theese type of events srry
Title: Re: Character creation event (RMXP)
Post by: Leventhan on August 29, 2007, 03:53:34 AM
Add [Resolved] on the topic title.