Turning towards party followers

Hi. Is it possible to make your lead actor turn towards the first party follower, no matter where they are? Let me explain.

So you investigate an event on the map and you want one of your party to comment on it. You add a text box with their picture in it. But if you want the MC to reply directly to them by turning and facing them, the best you can do is add a move route turning them 180 degrees, or up/down/left/right. This is fine if you can dictate where the party followers are, for example by controlling the approach with a move route event or by placing impassable objects to restrict the way to access said event.

But what if that's not possible or jarring with your map design? For example, you approach a bar and the event is in the middle. The player may approach from the left, right or bottom. Now there is a very real chance that the MC will turn and talk to an empty space rather than directly to the party member.

Is there a script that treats party followers as objects in their own right, with a script call for the move route that lets you specifically turn to face them? Or any other way, come to that.

Edit: And whilst we're on the subject, is there a way to control the followers so that they can be turned by script commands? For example, if you access the event by moving right and then down, the first follower will be facing right whilst the MC will be facing down. Is there are way to force them to also face down so that they're not talking to the wall?
To get an individual, or all, followers to turn, do this as a script call:
Code:
$game_player.followers[x].set_direction(4)
where x is the follower index - the first follower will be 0.

So if you want the 4th party member to turn (i.e. the 3rd follower) it would be
Code:
$game_player.followers[2].set_direction(4)

If you want ALL followers to do it, this would work:
Code:
$game_player.followers.each {|follower| follower.set_direction(4)}

NOTE
The numbers & directions correspond to the keys on your number pad. 2 = down, 4 = left, 6 = right, 8 = up

As for the main part of your question, I've not come across a way of doing that - which, of course, does not mean that one doesn't exist. The nearest I've got is player turns towards a specific event but I don't know if that could be adapted to 'turn towards follower'. I am doubtful, but perhaps someone with more knowledge will pass by and give an informed answer.

In case you want to fiddle around with it to see what you can do, the script call in a move route is:
Code:
turn_toward_character($game_map.events[15])

Normally you would change the [15] to the id of the event.
As for the main part of your question, I've not come across a way of doing that - which, of course, does not mean that one doesn't exist. The nearest I've got is player turns towards a specific event but I don't know if that could be adapted to 'turn towards follower'. I am doubtful, but perhaps someone with more knowledge will pass by and give an informed answer.

In case you want to fiddle around with it to see what you can do, the script call in a move route is:
Code:
turn_toward_character($game_map.events[15])
Normally you would change the [15] to the id of the event.
You basically answered the question, you just never tried combining them.
1664454079755.png

works as intended. Turns to the follower next to the player.

Although it seems to have a slight issue. If you want it to turn to the second follower, it may work.
On the event I'm testing, it works when facing the left or right of the event. When on top or bottom, it only works when the follower is directly behind the player , not off to the side. Imagine you walk down along a path and move one square to the left (or right) then talk to an event. The player doesn't turn. Otherwise it works fine from what I see so far.
1664453629784.png
That's fantastic! Thanks you two.

To be honest, in my current game there are only two characters: the MC and one follower, so turning to a third or fourth follower is a problem I will face some other time.

Is there a way to make the follower turn towards the player, regardless of direction?

Edit: Nvm. I found what I am looking for. If anyone else searches for this, here is a summary of what I found:

To turn the player towards a follower, as said above, use
turn_toward_character($game_player.followers[0])

To turn a party follower towards a player, I used this script:
Then following the instructions in the script, create a comment to specify which party member to control, using a negative number. So for follower 1, create the comment
<move character: -2>
followed by a move route with the command 'Turn towards player'.

To turn the player towards the event itself, as found in the topic
Use
turn_toward_character($game_map.events[x])
with x being the ID of the event you wish to turn towards.
Thread closed

Original thread: https://forums.rpgmakerweb.com/threads/turning-towards-party-followers.151629/