Start Following Path Icon Start Following Path

This action will start an instance following along a path that has been created in the Asset Browser. You would then use this action to tell your instance which path to follow, what speed to follow the path (measured in pixels per game frame), how to behave when it reaches the end of the path, and whether to follow the absolute or relative path position. When setting the speed you can use negative values to signify that the instance should follow the path in reverse and it's worth noting that the speed you set here can be modified by the speed modifier set in the path editor for each path point, so if you set the path speed to 2 and in the path one of the points has a speed modifier of 200%, then the actual speed at that point will be 4 pixels per game frame.

Once you've set the initial path speed you can set how the instance should behave when it reaches the end of the path from the following options (note that when an instance reaches the end of a path this will also trigger an Other - Path Ended Event):

Finally, you can flag the path as being Absolute or not. By default the instance will start following the path from its current position (the relative position), but if you flag the Absolute checkbox then it will start following the path exactly as you designed and placed it in the Path Editor (the absolute position). The image below illustrates this:

Path Relative ExampleAs you can see in the image above, the two instances are following the same path started with this action, but one of the instances is following the absolute path while the other is following the relative path. It should be noted that when Absolute is flagged the instance will "jump" to the start of the path no matter where in the room it is placed.

 

Action Syntax:

Path Start Action

Arguments:

ArgumentDescription
PathThe path asset to start following
SpeedThe speed (in pixels per game frame) to follow the path
On EndThe response to reaching the end of the path
AbsoluteWhether to start at absolute or relative position

 

Example:

Path Start ExampleThe above action block will make the calling instance follow a path (starting at its absolute position and continuing at end) when a key is pressed.