Game Development Reference
In-Depth Information
Turn 0 is the very start of a battle, before anyone has acted. We only want the event to trigger once per battle, and
we only want it to trigger at all if the player has accepted the subquest and not yet completed it. In addition to what is
displayed in the preceding code, you could add another conditional branch to that nest that requires BossDefeated
to be off as well (remember that the player fails the quest if he or she defeats Gemini before turning in the rat tails).
Following, I'll give the code for page 2, which is essentially identical to that for pages 3 and 4. The only difference is the
rat that is considered for the condition and the loss of its Immortal state. You'll want to tweak the subsequent pages as
relevant to ensure that all three rats have their own event page, such as the one following:
Condition: Enemy [1. Rat]'s HP 0% or below
Span: Battle
@>Conditional Branch: Switch [0022:SQ2Start] == ON
@>Conditional Branch: Variable [0008:RatTails] < 5
@>Control Variables: [0008:RatTails] += 1
@>Text: -, -, Normal, Bottom
: : You got a Rat's Tail!
@>
: Branch End
@>
: Branch End
@>Change Enemy State: [1. Rat], - [Immortal]
When the first rat's HP drops to 0% or below, we check to see if the player is currently on this subquest. If he/she is,
we check to see if he/she has five rat tails already. If he/she doesn't, we add one to the value of the RatTails variable
and inform the player that he/she received a rat tail. At the very bottom of the battle event, we remove the rat's
immortality.
it doesn't matter much either way, but if you want a little more efficiency, you can have a conditional branch
that checks first to see if that rat has the immortal state, rather than attempting to remove a state it might not even have.
Note
to be clear, page 3 should involve [2. rat] and page 4 should involve [3. rat]. Make sure you're removing
immortal from the right rat!
Caution
There you have it! And it only took us four pages to create this quest as well.
Additional Exercises
Here are some extra exercises with which to flex your mental muscles.
1.
Have an Autorun event on the world map that triggers when the player has five rat tails
and forces them to fight a stronger rat (a sort of Rat King, if you will).
As with every Autorun, make sure you have some way of escaping the page, or your game
will loop it endlessly. Flipping a self-switch is as good a solution as any.
I would make it so that the player cannot escape that fight.
 
 
Search WWH ::




Custom Search