Help - Search - Members - Calendar
Full Version: Switches and Loops
RPG RPG Revolution Forums > Game Engines > RPG Maker VX Discussion
shafermitch@gmail.com
Well in my game i am trying to make a loop in the text. like the NPC will say do you understand and if you choose no then i want the NPC to explain it again. ive tried looping it but im obviously not doing it right.

and the one about switches is lets say for example you have to harvest 20 crops and the farmer will give you 25 GP for helping him. ive tried using the self switches the regular switches and variables but i just dont have any idea how to do it right.
leongon
use Label / Jump to Label
Sizux
For the crops, each time you harvest one, add +1 to a variable (call it "Crops") and then use a self switch so that crop cannot be harvested again. For the farmer, make a conditional branch that checks if the variable "Crops" is equal to 20. If so, he'll give the gold and activate a self switch, and if not, he'll ask for crops.

You MIGHT need the variable fix to do that correctly. Check the RPG Maker FAQ topic for it.
shafermitch@gmail.com
QUOTE (Sizux @ Feb 9 2010, 06:46 PM) *
For the crops, each time you harvest one, add +1 to a variable (call it "Crops") and then use a self switch so that crop cannot be harvested again. For the farmer, make a conditional branch that checks if the variable "Crops" is equal to 20. If so, he'll give the gold and activate a self switch, and if not, he'll ask for crops.

You MIGHT need the variable fix to do that correctly. Check the RPG Maker FAQ topic for it.


thank both of you for the help i appreciate it.
BasharTeg6
If you don't want to mess with variables you can operate each crop like a treasure chest. So when you gather one crop, it adds a new item (we'll call it CORN for this example) to your inventory. Then, when the player talks to the farmer again, you can run a conditional branch checking to see how many "CORN" the player has in his inventory.

This works the same as a variable, basically, but without actually having to use variables.

-Bash
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.