The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Tutorials and Eventing => Topic started by: Toasty on January 03, 2011, 03:23:00 PM

Title: Sprite's not following their move route
Post by: Toasty on January 03, 2011, 03:23:00 PM
I'm using RMVX and I wanted to have a little girl chase a little boy, in an attempt to kiss him.

But neither of the kids follow the route I've set for them?

Does anyone know why that is? I've checked my event script like 20 times...
Title: Re: Sprite's not following their move route
Post by: modern algebra on January 03, 2011, 03:53:40 PM
Might be something simple like you are setting the move routes in a parallel process event - if so, you might need to include some Wait frames or shut the event off and that could fix it.

Until you show me what your event looke like though, I can only guess at the problem.
Title: Re: Sprite's not following their move route
Post by: Toasty on January 03, 2011, 04:11:48 PM
Okay, thanks.

Yeah, the event is running in a parallel process. But I would like to keep it that way.
How do I show you my event script?
Title: Re: Sprite's not following their move route
Post by: modern algebra on January 03, 2011, 07:05:09 PM
You can just take a screenshot of it and attach it to your post.

Parallel processes repeat though - remember that. Unless you want the event to continually repeat, you want to turn the event off once its finished by turning on a self-switch that changes the event to another page. At the very least for this, you want to put wait frames.
Title: Re: Sprite's not following their move route
Post by: Toasty on January 04, 2011, 06:14:57 PM
You can just take a screenshot of it and attach it to your post.

Parallel processes repeat though - remember that. Unless you want the event to continually repeat, you want to turn the event off once its finished by turning on a self-switch that changes the event to another page. At the very least for this, you want to put wait frames.

Okay, well, I sat and fiddled a little with event script and I FINALLY got the boy and girl to run in the right directions and to repeat the pattern. I put the "girl-after-boy"-event on a tile instead, a tile that the Player HAVE to step on to get in to town, and set that tile to "player touch". Sp when the Player steps on it the event begins.

But how do I make it, so the tile doesn't activate next time the Player steps on it?
I don't want the girl to start chasing the boy EVERY time the Player enters the town. Is there a way to make it, so that the next time Player enters town or steps out of the Shop/Inn in town, the girl is just chasing the boy?
Anyway, this is what the event script looks like so far: (posted in two screenshots because the script was to long)
Title: Re: Sprite's not following their move route
Post by: modern algebra on January 04, 2011, 07:31:03 PM
Well, sure, if you use a self switch.

You also don't need to use a Player Touch event - it can be done with a Parallel Process if that would make more sense, it's just that you would have to end the Parallel Process Event. The problem with parallel process is that it restarts the event every time. So, it will set the move routes, then it will come to the end of the event, at which point it will repeat. Since it then repeats the move route commands, it overwrites the old one and replaces it with the new move route command. All you need to do to prevent that is stop the event from running.

For instance, the following event on parallel process would work the way you want it too:

@>Conditional Branch: Self Switch A == OFF
    @>Show Balloon Icon: [Kissing Girl], Heart
    @>Wait: 75 frames
    @>Show Balloon Icon: [Running Boy], Exclamation
    @>Set Move Route: [Running Boy] (Wait)       # <- Jump
    @>Control Self Switch: A =ON
  :  Branch End
@>Set Move Route: [Running Boy] (Repeat)        # <- Chase Pattern
@>Wait: 40 frames
@>Set Move Route: [Kissing Girl] (Repeat)          # <- Chase Pattern



I didn't write out the whole move routes there - but the first one is the jump route you have, and the other two are the repeating chase patterns.
Title: Re: Sprite's not following their move route
Post by: Toasty on January 05, 2011, 09:09:28 AM
Actually, it makes more sense to use the Player Touch event on a tile.

What should the script look like if I choose the keep the Player Touch event instead of Parallel Process event?
Also do you have handy link where I can read up on the whole "switch"-subject, because I don't think I understand it probably...  ::)
Title: Re: Sprite's not following their move route
Post by: modern algebra on January 05, 2011, 01:32:19 PM
It should look the same in the Player Touch event.

And sure, you can try this tutorial I wrote a long time ago: http://rmrk.net/index.php/topic,14229.0.html

It was written for XP, but the commands are almost all retained and switches and self switches function the exact same way.


Oh, and shoot. I forgot that you should put an Erase Event command at the very end of that event, whether Player Touch or Parallel Proces.

Though honestly, the better event might look something like this, since after the start, you want them to be running all the time:

On the first page of the event, have this:

@>Show Balloon Icon: [Kissing Girl], Heart
@>Wait: 75 frames
@>Show Balloon Icon: [Running Boy], Exclamation
@>Set Move Route: [Running Boy] (Wait)       # <- Jump
@>Control Self Switch: A =ON

Then, make a new page in the event. Have as its condition that Self Switch A must be ON. It should be parallel process and look like this:

@>Set Move Route: [Running Boy] (Repeat)        # <- Chase Pattern
@>Wait: 40 frames
@>Set Move Route: [Kissing Girl] (Repeat)          # <- Chase Pattern
@>Erase Event