Patrol Path Manager
using { /Fortnite.com/AI }
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /Fortnite.com/Characters }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /Verse.org/Random }
using { /Fortnite.com/Game }
# See https://dev.epicgames.com/documentation/en-us/uefn/create-your-own-device-in-verse for how to create a verse device.
# A Verse-authored creative device that can be placed in a level
path_manager := class(creative_device):
@editable
GuardSpawners: []guard_spawner_device = array{}
@editable
StartingNode: ai_patrol_path_device = ai_patrol_path_device{}
@editable
LogicOnSpawn: logic = false
@editable
Nodes: []node = array{}
# setup all custom patrol nodes
OnBegin<override>()<suspends>: void =
StartingNode.PatrolPathStartedEvent.Subscribe(CallSetupPath)
for (Node: Nodes):
Node.Setup(GuardSpawners)
CallSetupPath(Agent: agent): void =
spawn { SetupGuardNodes(Agent) }
# loop over all nodes to setup the map for the newly spawned guard
SetupGuardNodes(Agent: agent)<suspends>: void =
if (LogicOnSpawn?):
for (Node: Nodes):
Node.SetupGuard(Agent)
else:
Sleep(3.0)
for (Node: Nodes):
Node.SetupGuard(Agent)
You're reading a preview
The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.
Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.