Utils: Event Trigger Direction
This script provides some script calls that you can use in your conditional branches to check which direction an event is being triggered from. For example you can check whether an event is triggered from the front or from behind, and set up each branch to behave appropriately.
Download
Script: download here
Installation
- Open the script editor
- Place this script below Materials and above Main
Usage
The following methods are available.
Assuming two characters A and B
from_front? - returns true if B faces towards A from_behind? - returns true if B faces away from A from_left? - returns true if A approaches B from the left from_right? - returns true if A approaches B from the right from_side? - returns true if A approaches B from behind
Note that “left” and “right” depends on the character’s direction
Currently, this assumes A is the player and B is an event, so the “left” and “right” conditions are wrong if an event touches a player.
Initial Release: SyntaxError on line 133:
There is a typo ‘(‘ on the method definition.
This works great with Event Trigger Labels!
The copy I have uploaded only has 107 lines. Could it be a different script?
Oops. Seems select copy/paste from Dropbox is padding the lines.
Its this Method:
def from_behind?(
I see it. Wonder when that happened…