New Plugin: Random In Line


Wouldn't it be nice if ...

Events would just keep moving in a straight line unless something blocking them?

Well, I got the plugin for you! Random In Line!

This plugin add a new move route that will walk forward unless they aren't on an allowed region or there is something blocking their path. If such a case occurs then they will choose a random direction instead.

To use this, just add the following in a move route script.

  • SirL.MPRandomInLine.step(parent, regionIds...)

The parent in the general case will just be the value "this" without quotes. 

The regionIds is optional. If not provided then all tiles that are walkable will be valid. However, if provided then only regions matching that Id number will be valid if they are walkable.

Some examples:

SirL.MPRandomInLine.step(this) <- Make this event walk in straight line and turn if that is not possible

SirL.MPRandomInLine.step(this, 3, 4, 5) <- Make this event walk in straight line and turn if not possible or their next stop wouldn't be a region with an ID of either 3, 4 or 5.

Have fun walking in straight lines!

Leave a comment

Log in with itch.io to leave a comment.