Utils: Event Trigger Direction

Help spread the word!Share on FacebookShare on TumblrTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditFlattr the author

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.

Help spread the word!Share on FacebookShare on TumblrTweet about this on TwitterShare on Google+Share on LinkedInShare on RedditFlattr the author

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

Your email address will not be published.

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax