Home > Tutorials > RPG Maker VX > Random Encounters of the 3rd kind
Random Encounters of the 3rd kind
If you think this is a cooking system tutorial, you are unfortunately looking in the wrong tutorial. Sorry about that.
To help explain what this is about, we must first notice the awesome coolness of Pokemon... more specifically, the item Repel. I'm guessing every trainer packs more than a few of these to get through the endless random encounters of that game, unless I am the only person on the planet that doesn't like every-15-steps battles. Mr.Bubble has something on that...
Anyways, I can show you how to make something that runs out in 100 steps. I can show how to make the player sacrifice 5 HP to get 2 MP every 10 steps. And it's al; very, very simple:
1) Make a common event that activates with a corresponding PARALELL PROCESSING ONLY trigger switch.
Gotta love those caps...
2) Make two variables, one that shows the number of steps taken since the start of the game (In "Control Variables", it's in the "Other" section as "Steps"), listed as "Steps Taken",and another that is also the number of steps, BUT PLUS THE NUMBER OF STEPS YOU WANT THE PLAYER TO TAKE BEFORE THE ITEM/SKILL/OTHER THING WEARS OFF. This variable will be called "Steps Plus".
3) Make a conditional branch that checks if "Steps Taken" is GREATER THAN OR EQUAL TO "Steps plus". Then put in whatever you want to happen when the steps timer goes off. AND REMEMBER TO TURN THE SWITCH THAT STARTED THE COMMON EVENT OFF. Otherwise, it'll loop endlessly.
Look, I know what you're thinking. You're thinking, "But what if I need something to happen multiple times?"
It's actually very simple; just put something in at step two.
Change it to:
2)Make a variable for steps, then [new stuff starts here] make a cond. branch that activates when the switch, "Passed through once", is OFF. Then have it turn "Passed through once" ON and make "Steps taken" and "Steps Plus" equal. [New stuff ends there]
Oh, and one thing: Don't turn the switch that causes the Common Event off this time.
WARNING: NONE OF THE CONDITIONAL BRANCHES IN THIS TUTORIAL USED "ELSE" IN THEIR EXECUTION, AND YOU MUST DISABLE "ELSE" IN ANY CONDITIONAL BRANCH USED. TO DISABLE THESE, UNCHECK "SET HANDLING WHEN CONDITIONS DO NOT APPLY" AT THE BOTTOM OF THE PAGE.
Happy eventing!
|
|
Details
|
|
Tutorial:
|
Random Encounters of the 3rd kind |
|
Date Listed:
|
2010-02-14 |
|
Author:
|
TheBen
|
|
Total Hits:
|
1592 |
|
|