Check if player facing an event

Status
Not open for further replies.

microck

Veteran
Veteran
Joined
Jul 23, 2016
Messages
45
Reaction score
11
Primarily Uses
Hello !
So basically I search in the conditional branch a way to tell that: "if player facing an event".
Any solution (script or not) ? :)
 

Doktor_Q

I'm not a real doktor, but I am a real Q
Veteran
Joined
Aug 1, 2016
Messages
876
Reaction score
563
First Language
English
Primarily Uses
RMMV
Yanfly's Event Encounter Aid might have what you're looking for. I assume you're checking if the player is facing an event with the "event touch" property when it activates.

If you want to find if the player is facing a completely arbitrary event on the map, it's not terribly hard with some javascript, but, well, requires javascript.
 

Rabbitheart

Villager
Member
Joined
Feb 5, 2018
Messages
11
Reaction score
6
First Language
Finnish
Primarily Uses
RMMV
You can do it with event. Choose conditional branch and click the third tab. There you can pick "Character (x) is facing (y)."
 

microck

Veteran
Veteran
Joined
Jul 23, 2016
Messages
45
Reaction score
11
Primarily Uses
Already tried this plugin but I've got incompatibility issues. I just found an event solution (player x, y VS event x, y). Anyway, thanks ! :)
 

microck

Veteran
Veteran
Joined
Jul 23, 2016
Messages
45
Reaction score
11
Primarily Uses
VS for Versus. Maybe "in comparison to" is less confused.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,434
Reaction score
7,713
First Language
German
Primarily Uses
RMMV
You only need that if the player is not adjacent to the event.
An event with priority "same as " will only be triggered by action button if the player is facing it.
That is already part of the engine.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,111
Reaction score
13,713
First Language
English
Primarily Uses
RMMV
What is the event you want the player to be facing? Is it the event that's running this command? If so, how is the event triggered? If it's triggered by Action Button or Player Touch, then the player HAS to be facing it for the event to trigger.

If it's a different event, you'll have to compare the location of the player/event and what direction the player SHOULD be facing, and then check if they ARE facing in that direction. Won't go into any further details until you answer those questions.
 

microck

Veteran
Veteran
Joined
Jul 23, 2016
Messages
45
Reaction score
11
Primarily Uses
It's a different event.
you'll have to compare the location of the player/event and what direction the player SHOULD be facing, and then check if they ARE facing in that direction.
Yes that's the way I do it. :) I found this solution months ago.
 

KillerPixEEL

Killer Pixeel Games
Veteran
Joined
Sep 4, 2019
Messages
139
Reaction score
40
First Language
English
Primarily Uses
RMMV
How did you do this? I'm trying to figure this out
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,713
First Language
English
Primarily Uses
RMVXA
[necro]Spitzfire1985[/necro]
You will need to post your own thread with enough detail for people to l ow whether you need the simple or distance solution.

[mod]Closing[/mod][/necro]
 
Status
Not open for further replies.

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

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,048
Messages
1,018,543
Members
137,834
Latest member
EverNoir
Top