Aggressive Path Follower LPK_AggressivePathFollower.cs

This component causes its game object to follow a pre-determined path by the designer. This object will also be aggressive to a set GameObject or tag.

Suggested use:

Create a path of game object nodes, and assign them in the correct component property location. Create an object (enemy, pickup, etc) to either chase or run away from an approaching object.

Examples found in: Project 4

Components
Property Type Description Default Value
Component Properties
Loop Type LPK Path Follower Loop Type How to handle path looping once the end of the path is reached. SINGLE
Speed Float Speed (units per second) to move along the path. 5
Aggression Properties
Enemies Array of Objects Objects to attack/run from if set. 0
Enemy Tag Array of Strings Tag enemies will have. Useful if this path follower should react to multiple different GameObjects. 0
Aggression Range Float Distance at which the character becomes aggressive. 10
Aggression Speed Float Speed (units per second) the object will move at while aggressive. 5
Is Coward Boolean "Run from the enemy instead of running towards the enemy. False
Don't Forget Boolean Once an enemy is found, do not forget about it. False
Nodes Array of Objects Nodes that make up the path to follow. They can be any Unity object. 0
Event Sending Info
Options
PathFollowerNoticeEnemyEvent Event Conditions Event sent when the path follower notices an enemy. N/A
PathFollowerLostEnemyEvent Event Conditions Event sent when the path follower loses an enemy. N/A
PathFollowerReachNodeEvent Event Conditions Event sent when the path follower reaches a node in its path. N/A
PathFollowerReachFinalNodeEvent Event Conditions Event sent when the path follower reaches the final node in its current path. N/A
Values
Event LPK Event Object Event to dispatch when conditions are met:
  • Conditions are listed above in Options.
None
Event Sending Mode LPK Event Sending Mode Who receives the event sent info when input is given from the input device. OWNER = only send to components on the same game object. ALL = send to all game objects. TAGS = send to specified tags. TAGS
Event Sending Mode - TAGS
Tags Array of Tags Which tags will receive this event. 0
Event Sending Mode - TAGS
Tags Array of Tags Which tags will receive this event. 0
Debug Properties
Print Debug Info Boolean Toggle console debug messages. False
Label String Notes for the user about this component. This does nothing to the game or build. None