|
|
In this tutorial you will learn...
How to use conditional branches to find out an event's position
How to resume a cutscene after parallel movement
Hey there, and welcome to my second mini-tutorial. This is a carry-on from my lengthly background parallel movement tutorial. In this tutorial,
I will be teaching you how to resume a cutscene after using the parallel movement that I taught you about. The title really should have been
something like 'Resuming cutscenes after background movement,' but it wouldn't fit, so we'll have to stick with what we've got! Anyway, let's
get going.
So, head back to your map with your parallel movement system on it. Now, there is one issue with parallel movement that you might have noticed.
Because the player can tap through the text at variable speeds, when we get to the bit of the cutscene where we stop the parallel movement,
the characters that have been executing the parallel movement could be in any place. For example, the fighters that I used last tutorial
could be in the square that they jump to, or the square that they walk to. Because of this, it is difficult to resume a cutscene and use move
routes for the parallel movers. However, I have a solution.
When you resume your cutscene, before we tell either of the parallel fighters to move, we need to get their position. To do this, we're going to
use a couple of variables. In your autorun event, use a control variable command and create a new variable called Event X. This variable will hold
the map-x coordinates of your event. Create another variable called - yup, Event Y. This will hold the map-y values. Now, because my characters
only move horizontally (I.e. they do not move up or down) I only need to use the map-x variable. I am going to control this variable to the
character that I want to move's x-coordinate. See the picture:
See what I have done here? Now, because my thief character can only be in this position (X = 10) or the one next to it, I only need to use one conditional
branch, like so:
You see how this works? Basically, I am finding out what position my thief character is in, and if his x-coordinate is 10, I am moving him across
one, and if his x-coordinate is anything else (in the case of this cutscene, it can only be 9 if it's not 10), I'm just making him turn.
If you have a cutscene where the parallel movement has more outcomes, then you can use conditional branches. It is best to find out one of the
coordinates first, and then branch to find the others. For example, if I had a character that could be on x-coordinate 11 or 12, and y-coordinate
13, 14, 15 or 16, I would find out the x-coordinate first, like so (you can scroll the box!):
It's best to start with the coordinate that has the fewest outcomes - in this instance, it would be the x-coordinate, because this can only be
one of two things. This will make your conditional branching easier, quicker and slightly less complicated.
And that's pretty much it!
I know that it's awfully complicated and fiddly, but I hope I've given you some help as to how to go about this. If you want a closer look at
some parallel background movement, have a look at my background movement demo, here.
:: << Previous Tutorial ::
:: Home ::
:: Next Tutorial >> ::
|
|