Force player to face event?

coticka

Veteran
Veteran
Joined
May 30, 2015
Messages
74
Reaction score
10
First Language
English
Primarily Uses
RMMV
Hello friends. I ran into a small problem that I can't find out how to work-around. It seems there isn't a built-in way to force the player to face a specified event. When map enemies chase a player and finally catch them, I'd like to be able to make the player face the direction of the enemy event as I also have another graphic change for the player before the battle starts. Is this at all possible? Thank you for reading.
 

Sakurra

Is probably eating a brownie
Veteran
Joined
Sep 1, 2015
Messages
562
Reaction score
743
First Language
English
Primarily Uses
RMMV
Have you tried "Set Movement Route" and click the direction you want them to face?
 

coticka

Veteran
Veteran
Joined
May 30, 2015
Messages
74
Reaction score
10
First Language
English
Primarily Uses
RMMV
Yes, the problem is the enemy event movement chases the player down using the quickest discernible path, so there's no way to know which direction the enemy event will collide with the player. In other words, I can specify an event to face the player, but not the other way around.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,669
First Language
German
Primarily Uses
RMMV
Set move route is the solution, but it is not an easy one.
When the event catches up, you'll need to compared the positions to determine the Direktion the player needs to turn to, and then give those commands.

There is no single command solution, you'll have to calculate where the player needs to turn to.
 

Sakurra

Is probably eating a brownie
Veteran
Joined
Sep 1, 2015
Messages
562
Reaction score
743
First Language
English
Primarily Uses
RMMV
What about the conditional branch on tab 3 for If Character is facing down, left, right, left, up etc???

Edit1: Maybe you can set it up to whre IF character is facing, then set a Set movement route to face the direction.

Would that work?
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,660
Reaction score
563
First Language
English
Primarily Uses
RMVXA
One way would be to use variables for the event location and player location. Do a comparison of the variables and determine which way to face.
 

seita

Donn_M
Veteran
Joined
Feb 6, 2013
Messages
2,254
Reaction score
611
First Language
English
Primarily Uses
There is a built in function worked in, the option is just not available in the options. You can use this script call:

$game_player.turn_toward_character($game_map.events[ID])

just replace "ID" with the event ID you want the player to face
 

coticka

Veteran
Veteran
Joined
May 30, 2015
Messages
74
Reaction score
10
First Language
English
Primarily Uses
RMMV
I love you. Thank you very much mah man. :LZYwink:
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,986
Members
137,561
Latest member
visploo100
Top