Description

Assigns a specific motion event

Usage

Parameters

  • dir {Array}

    Id path

    • left
    • right
    • up
    • bottom
    • lower_left
    • lower_right
    • upper_left
    • upper_right
    • random
    • turn_left
    • turn_right
    • turn_up
    • turn_bottom
    • turn90dright
    • turn90dleft
    • turn_180d
    • turn90drightorleft
    • turnatrandom
    • turn_toward
    • turn_away
    • step_forward
    • step_backward
    • move_toward
    • move_away
    • switchONX
    • switchOFFX
    • directionfixON
    • noanimationON
    • stopanimationON
    • through_ON
    • alwaysOnTop_ON
    • alwaysOnBottom_ON
    • directionfixOFF
    • noanimationOFF
    • stopanimationOFF
    • through_OFF
    • alwaysOnTop_OFF
    • alwaysOnBottom_OFF
    • frequence_X
    • speed_X
    • wait_X
    • graphic_X
    • opacity_X

    Example

    ["left", "wait_30", "right"]
    

  • callback {Function} optional

    (optional) Callback when the road is finished

  • params {Object} optional

    (optional) Additional parameter for the path :

    • repeat : Repeats the way when it is finished

Example

RPGJS.Player.moveRoute(["turn_left", "wait_40", "left", "left", "speed_6", "left", left"]);

Discussion