Event checking if player interacted with it from behind

Status
Not open for further replies.

Oddball

Veteran
Veteran
Joined
Sep 4, 2014
Messages
1,923
Reaction score
535
First Language
English
Primarily Uses
N/A
How do i have an event check if the player interacted with it from behind? Without having to make four eventing pages, one for each direction it will be facing?

I want to make a system where the player can avoid on map battles by maybe knocking out the enemy troop and maybe getting experince or even items they wouldn't get by fighting them in some cases. This can be done by making four event pages and checking if the player is facing the same way the event is when they interact with it, but i want to do something simpler
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,640
First Language
Czech
Primarily Uses
RMMV
Page: Locked direction. Save direction of the event using control variables to a variable and compare it to player's. If they're equal, he came from behind. If you need to unlock direction, you can do it theough movement route.
 

Oddball

Veteran
Veteran
Joined
Sep 4, 2014
Messages
1,923
Reaction score
535
First Language
English
Primarily Uses
N/A
I want it to be on one page and have the event have any kind of movement
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,640
First Language
Czech
Primarily Uses
RMMV
Then have a custom move route that always unlocks the facing at the beginning and locks it at the end.
 

Rockenberg

Someone
Veteran
Joined
Jan 23, 2017
Messages
52
Reaction score
54
First Language
English
Primarily Uses
N/A
There should be a way to setup conditional branches for that.
I use a similar setup with bookshelves where you just can't interact with it, if you're not facing it.

1.PNG 2.PNG
 
Last edited:

Oddball

Veteran
Veteran
Joined
Sep 4, 2014
Messages
1,923
Reaction score
535
First Language
English
Primarily Uses
N/A
@Rockenberg what if the event is facing down? I know how to do this with multipule pages, i'm trying to do this with one
 

Rockenberg

Someone
Veteran
Joined
Jan 23, 2017
Messages
52
Reaction score
54
First Language
English
Primarily Uses
N/A
It should work the same.

EDIT:
Basically you have the option to make a directional input of up, down, left, or right
 

Ace of Spades

Veteran
Veteran
Joined
Jan 19, 2017
Messages
138
Reaction score
202
First Language
English
Primarily Uses
@Rockenberg what if the event is facing down? I know how to do this with multipule pages, i'm trying to do this with one
Try something like this in your conditional branch:
Code:
$gameMap.event(this._eventId).direction() == $gamePlayer.direction()
It will check to see if the player and event are facing the same direction.

EDIT: Sorry, didn't realize this was RMAce, my mistake! I'm sure someone could help translate that to Ruby
 

Rockenberg

Someone
Veteran
Joined
Jan 23, 2017
Messages
52
Reaction score
54
First Language
English
Primarily Uses
N/A
@Oddball
I tried to recreate what you were looking for?
2 (1).png


The way @TheoAllen is probably a lot simpler though.
 

Oddball

Veteran
Veteran
Joined
Sep 4, 2014
Messages
1,923
Reaction score
535
First Language
English
Primarily Uses
N/A
Thank you Theolized! You solved it!
 

hiddenone

Lurker Extraordinaire
Global Mod
Joined
Feb 19, 2014
Messages
2,496
Reaction score
5,332
First Language
english
Primarily Uses
RMMZ

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

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

Latest Threads

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,035
Messages
1,018,454
Members
137,821
Latest member
Capterson
Top