Event Fourway Passage

Discussion in 'JS Plugins In Development' started by gilgamar, Mar 9, 2016.

  1. gilgamar

    gilgamar Veteran Veteran

    Messages:
    132
    Likes Received:
    53
    Location:
    Alberta, Canada
    First Language:
    English
    Event Fourway Passage v1.03


    Description
    Make any tile have the passability you want using events. It works like the tileset editor's Passage (4-dir) setting but for events instead of tiles. You can change the passage options on the fly with set move routes. This can be used to create dynamically changing passages.


    GIL_Fourway.js


    Playable Demo


    Features

    • Change event 4-dir passage settings dynamically.
    • Includes player shading! Just enable check cover in plugin parameters.
    • Check cover will shade the player automatically when behind shadows and waterfalls.



    This script also patches Tyruswoo's TYR_FollowerControl.js if it is present so you can independently set the opacity, transparency, direction fix, blend, walk/step anime and move speed of your followers when applying set move routes. TYR_FollowerControl.js can be found below:





    How to Use


    Just add the script line:


    this.four_way(X)


    to the custom route or set move route of an event and replace X with the appropriate code from the list below. The code just tells the function which directions the tile can be accessed/exited from. This will override the tile passability.


    Direction Codes

    Fourway Codes
    U UP
    R RIGHT
    L LEFT
    D DOWN

    URLD Code
    X 0000 0
    D 0001 1
    L 0010 2
    LD 0011 3
    R 0100 4
    RD 0101 5
    RL 0110 6
    RLD 0111 7
    U 1000 8
    UD 1001 9
    UL 1010 10
    ULD 1011 11
    UR 1100 12
    URD 1101 13
    URL 1110 14
    URLD 1111 15



    Terms of use and Credits


    Free to use in any project.


    Credit me as Gilgamar if you use this!


    Thanks to Tyruswoo also.
     
    Last edited by a moderator: Mar 31, 2016
    #1
    Tyruswoo and DreamX like this.

Share This Page