• Welcome to The Cave of Dragonflies forums, where the smallest bugs live alongside the strongest dragons.

    Guests are not able to post messages or even read certain areas of the forums. Now, that's boring, don't you think? Registration, on the other hand, is simple, completely free of charge, and does not require you to give out any personal information at all. As soon as you register, you can take part in some of the happy fun things at the forums such as posting messages, voting in polls, sending private messages to people and being told that this is where we drink tea and eat cod.

    Of course I'm not forcing you to do anything if you don't want to, but seriously, what have you got to lose? Five seconds of your life?

Help needed with RPG Maker XP!

Salazard

Nyom Nyom Nyom
I hope I've made this thread in the right place...

Anyway, I want to make my character follow another character on the map. Would also be good to know how to do the opposite of this as well. I've been fiddling about with the program but I haven't got a clue how to do it! Any help would be greatly appreciated! =]
 
Hmm. I haven't done this in quite a while, but let's see... If you want an NPC character to follow the player:

There should be a command that lets you assign new functions to the keyboard keys (it was called "Enter Password" or something like that on RM2K; I'm sure there's a similar function in RMXP). Find it, and then create a parallel event that changes the function of the directional keys so that they not only move the player character, but also register this direction in a variable of some sort (assign a specific value to each direction or something). Then the next time the player character moves, have the "follower" move in the direction you registered just before.

In other words: when you press a directional key, the event you created will move the player character in that direction; then it will check the variable and see what value it currently has. It will then move the "follower" character in the corresponding direction, and, lastly, it will change the variable to whatever value goes with the directional key you pressed in the first place. Let's say you're using the following values: 1 for up, 2 for right, 3 for down, 4 for left. If the player steps up, then the event will check the variable and see what value it already has; if the value is, say, 4, then it means the player's previous step was to the left, so the follower will move left. After both characters have moved, the event changes the variable to 1, because you moved up.

I guess it's a bit complicated; I'm sorry I can't explain it any better. like I said, it's been a long time since I last used RPG Maker, and I don't even remember the names of the event commands any longer...

EDIT: If you want the player character to follow an NPC character, it's a lot easier. Just create an event that moves the character leading the way, then create an event that moves the player character along the same path.
 
Last edited:
Back
Top Bottom