Hello,Im trying to make a event that is a enemy that spawn from another map to this,then move ramdom,if it see the player it will chase it,and when it touch the player start the battle,the event trigger is On event Touch,I have already made all this,the problem is that i also want that when the player sneak and touch the event from behind it have advantage in the battle.I read the description of YEP Event Encounter Aid and that is what i need but it is a paid plugin,there is a way to do that without plugins?or maybe with a free one?
Condicional branch if player touch event from behind
RPG Maker MV SupportThis is simple enough with no plugins required through eight conditional branches (four for getting where the event is looking with four inside those conditional branches making sure the player is looking in the same direction.
IF Event is looking Right
IF Player is looking Right
>Put eventing here
IF Event is looking Left
IF Player is looking Left
>Put eventing here
IF Event is looking Up
IF Player is looking Up
>Put eventing here
IF Event is looking Down
IF Player is looking Down
>Put eventing here
IF Event is looking Right
IF Player is looking Right
>Put eventing here
IF Event is looking Left
IF Player is looking Left
>Put eventing here
IF Event is looking Up
IF Player is looking Up
>Put eventing here
IF Event is looking Down
IF Player is looking Down
>Put eventing here
that will activate that branch also if the event is touching the player from behind,i only want if the player touch the event from behind and not the other way around
Is this being activated by player touch or the action button?
no,on event touch
Hi!
Following the @Iron_Brew explanation, you also need to check the player position and event position.
Because, both player and event can be looking in the same direction, but not necessarily being behind each other.
Both are looking down, but they are not behind each other.
To event this is simple, you check the Player and Event direction, if they are equal, then you check their positions and compare:
For the Down and Up direction, you need to compare their Y coordinate.
Following the @Iron_Brew explanation, you also need to check the player position and event position.
Because, both player and event can be looking in the same direction, but not necessarily being behind each other.
Both are looking down, but they are not behind each other.
To event this is simple, you check the Player and Event direction, if they are equal, then you check their positions and compare:
For the Down and Up direction, you need to compare their Y coordinate.
- Down - The Y coordinate of the player must be less than the event.
- Up - The Y coordinate of the player must be higher than the event.
- Right - The X coordinate of the player must be less than the event.
- Left - The X coordinate of the player must be higher than the event.
Ah! Apologies, yeah I should have clarified that first. Sorry pal!
is completely right!
Hi
1rst:im using a pixel movement plugin so sometimes player and event will be off-grid,but i think that there is a script that interprete the exact pixel posicion,i will investigate that
2nd:when you interact with a event that can move it automatically look at the player,so it will be not facing down anymore
You are going to have an issue, because the moment the player touches the event, before any commands are run, the event is going to turn around and face the player. So by the time the commands are run to check to check the player/event direction, the event will have changed to face a different direction.
Is the event moving? If not, you can check the Direction Fix button, which will prevent the event turning. If you then WANT them to turn AFTER you checked the direction, you will need to use a move route to turn off direction fix.
If the event IS moving, you are going to need a plugin to stop the event turning because it's been activated.
Is the event moving? If not, you can check the Direction Fix button, which will prevent the event turning. If you then WANT them to turn AFTER you checked the direction, you will need to use a move route to turn off direction fix.
If the event IS moving, you are going to need a plugin to stop the event turning because it's been activated.
the event is moving,is there a plugin for prevent it to face the player?
Original thread: https://forums.rpgmakerweb.com/threads/condicional-branch-if-player-touch-event-from-behind.143462/