Is there anyways for an event to understand if player looks it

lPlayerl

Villager
Member
Joined
Sep 29, 2020
Messages
5
Reaction score
1
First Language
English
Primarily Uses
Other
I will make a horror game and there will be a monster that will attack if user doesnt look at it and if there is a way for an event to understand when player looks it would be really good. :)
 

NeoPGX

~ King of Cuteness ~
Veteran
Joined
May 15, 2014
Messages
847
Reaction score
175
First Language
English (US)
Primarily Uses
N/A
I will make a horror game and there will be a monster that will attack if user doesnt look at it and if there is a way for an event to understand when player looks it would be really good. :)
Just to clarify, is this monster something like the Boos from Mario games?

They approach and (when close enough) attack the player when the player isn't looking in their direction.

But when the player does, they will stop moving.
 

lPlayerl

Villager
Member
Joined
Sep 29, 2020
Messages
5
Reaction score
1
First Language
English
Primarily Uses
Other
Just to clarify, is this monster something like the Boos from Mario games?

They approach and (when close enough) attack the player when the player isn't looking in their direction.

But when the player does, they will stop moving.
Yes it is
 

NeoPGX

~ King of Cuteness ~
Veteran
Joined
May 15, 2014
Messages
847
Reaction score
175
First Language
English (US)
Primarily Uses
N/A
Yes it is
It may be possible to do a "simplified" version of what you want using a series of layered conditional branches that serves as checks and have it loop constantly so it checks for the information every single frame.

Though the problem is that it will cause the monster to stop whenever the player is looking in the opposite direction the monster is regardless of rather the player can actually see it . There is NO way for the game to know if the player is actually looking directly at it.
 

lPlayerl

Villager
Member
Joined
Sep 29, 2020
Messages
5
Reaction score
1
First Language
English
Primarily Uses
Other
It may be possible to do a "simplified" version of what you want using a series of layered conditional branches that serves as checks and have it loop constantly so it checks for the information every single frame.

Though the problem is that it will cause the monster to stop whenever the player is looking in the opposite direction the monster is regardless of rather the player can actually see it . There is NO way for the game to know if the player is actually looking directly at it.
Ow ok no problem thanks!
 

zzmmorgan

I've used punchcards
Veteran
Joined
Jul 10, 2020
Messages
113
Reaction score
179
First Language
English
Primarily Uses
RMMV
You can set a variable to the player's Map X position and one to the Map Y and the same for the monster. Then set a variable for the player's direction. Some coordinate math on the positions to compare the positions so if say the player is at 4, 2 and the monster is at 4, 5 and the player is direction is to the right then they're looking at the monster....
1601333824965.png

You would want that in a parallel event so if there's more than one monster it'll start getting complex as you don't want a bunch of parallel events on a map so you'd have to have a common event running parallel checking the player's position against each monster then setting a variable for the closest monster then each monster event would have to be triggered by the variable....
 

lPlayerl

Villager
Member
Joined
Sep 29, 2020
Messages
5
Reaction score
1
First Language
English
Primarily Uses
Other
Thank you I will only use one monster:XP1:
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,685
Reaction score
1,097
First Language
Portuguese - Br
Primarily Uses
RMMZ
Hi!
You have a lot of ways to check this, and my method can be improved too. But I will give you a start:

As you can see, it will be a matter of changing the event id's, if you want to check multiple events.
I think the default editor can be a little messy, but I choose to do it that way because it's easier to explain.

Hope it helps :)
 

lPlayerl

Villager
Member
Joined
Sep 29, 2020
Messages
5
Reaction score
1
First Language
English
Primarily Uses
Other
Hi!
You have a lot of ways to check this, and my method can be improved too. But I will give you a start:

As you can see, it will be a matter of changing the event id's, if you want to check multiple events.
I think the default editor can be a little messy, but I choose to do it that way because it's easier to explain.

Hope it helps :)
Thanks so much!
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Ami
What do you think about the Wood Bridge inside of Volcano?
Yet another gaming question, i'm currently playing Last of Us 2 and want to get another game to play next but can't decide between Ghost of Tsushima, Miles Morales & Jedi Fallen Order. After the latest mandalorian i AM on a star wars kick, but i also LOVED the last spiderman game that prequels Miles Morales. Ghost of Tsushima is the bottom of my list but i heard it was AWESOME. Just want a good story & fun gameplay.
I checked out Genshin Impact gameplay out of curiosity. I can't believe it's available as a mobile game too. Smooth animation, great music, and stellar sound effects (the ambient sounds are pretty detailed).

I'm flabbergasted to see games have becoming more and more advanced. Maybe also because I'm oblivious to current trend for a long time, it almost feel like I'm being sent into distant future. xD
xDRAGOONx wrote on WaywardMartian's profile.
Your artwork is amazing!!!
:ewat:
Stream will be live shortly with a session of the Interactive Text Adventure! Feel free to drop by!

Forum statistics

Threads
105,669
Messages
1,015,412
Members
137,344
Latest member
Zindasan0078
Top