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

  1. Open the script editor
  2. 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.

You may also like...

4 Responses

  1. RogueDeus says:

    Initial Release: SyntaxError on line 133:
    There is a typo ‘(‘ on the method definition.

    This works great with Event Trigger Labels!

Leave a Reply to RogueDeus Cancel reply

Your email address will not be published. Required fields are marked *