Route Actor Class

This page aims to explain the technical details of the Patrol Route Actor Class. Here, you will find tables showing the available properties and functions for this actor.


Components

As previously mentioned, the Patrol Route is an Actor class that contains several components, enabling it to function as intended. It is highly recommended that you do not remove any components unless you are sure what you are doing.

  • Spline component: This component is used to represent patrol points in your game. The spline itself only serves as a visual representation in editor and is removed from the actor as soon as the point data has been extracted.


Overview

The Patrol Route Actor contains three properties, six functions and two event dispatchers. This section of the page contains detailed information about each of these elements, presented in tables for easier understanding.

3 Properties

6 Functions

2 Event Dispatcher

Properties

The patrol route comes with a selection of properties that are used throughout the system. Below, you will find a table containing all the properties and some general information.

Name
Type
Description

Draw Route Debug

Boolean

This determines whether the route actor should draw debug shapes to visualise the route.

Spline Direction

ERouteDirection

This determines the direction of the route. It can be edited as a drop-down menu in the details panel.

Points

FPatrolPoint (Array)

Array that arranges all the patrol points in the correct order based on the direction of the route.

Functions

The patrol route comes with a range of public and private functions that can be used to access or modify route data. Below, you will find a table containing details of all the route's functions and some general information.

Name
Access
Description

Make Linear Spline

private

Iterates over all spline points to ensure they are set to linear, thereby keeping the spline tangents straight.

Get Next Patrol Point

public

It returns the next patrol point based on the given index.

Create Patrol Points

private

Creates FPatrolPoints data based on spline.

Get Point By Distance

public

Iterates through all the points and returns the one closest to the given origin.

Reverse Points

private

Reverses the points stored for the patrol route.

Draw Debug

private

Draws debug shapes for the route using the Debug Library.

Event Dispatcher

The patrol route comes with event dispatchers that allow you to monitor important changes within the patrol route without having to check the code yourself. See the table below for a list of all the included event dispatchers and some general information.

Name
Returns
Description

On Points Created

FPatrolPoint

This is called when the Patrol Point data has been created by the Spline Actor.

On Spline Removed

None

Called when the patrol route has removed the spline component after creating the point data.

Last updated