TargetLostEvent

event
TargetLostEvent<public>: listenable(agent)

Triggers when the turret loses a target. Sends the `agent` that was lost.

Module
/Fortnite.com/Devices
Declared in
automated_turret_device
Source
fortnite

Used in

UITemplate / Materialblock Gameplay Device verse-source
for (Teleporter : RemoveTeleporters):
            Teleporter.TeleportedEvent.Subscribe(ResetGuardStates)

        # Subscribe to guard spawner events
        Spawner.SpawnedEvent.Subscribe(GuardSpawned)
        Spawner.AlertedEvent.Subscribe(GuardAlerted)
        Spawner.TargetLostEvent.Subscribe(GuardLostTarget)
        Spawner.SuspiciousEvent.Subscribe(GuardSuspicious)
        Spawner.UnawareEvent.Subscribe(GuardUnaware)
        Spawner.DamagedEvent.Subscribe(GuardDamaged)
        Spawner.EliminatedEvent.Subscribe(GuardEliminated)
        Spawner.EliminatingEvent.Subscribe(GuardEliminating)
NpcSystem / Npc Statemachine verse-source
# Subscribe to the NPC Spawner Device SpawnedEvent and all to an array of NPCSubscriptions that can be cancelled on En
        SubAdd(SpawnerDevice.SpawnedEvent.Subscribe(NPCEvents.OnNPCSpawned))
        SubAdd(SpawnerDevice.EliminatedEvent.Subscribe(OnNPCEliminated))
        SubAdd(SpawnerDevice.EliminatedEvent.Subscribe(NPCAudio.OnGuardEliminated))
        #SpawnerDevice.SuspiciousEvent.Subscribe(OnGuardSuspicious)
        # SpawnerDevice.AlertedEvent.Subscribe(OnGuardAlerted)
        #SpawnerDevice.TargetLostEvent.Subscribe(OnGuardLostTarget)
        # SpawnerDevice.UnawareEvent.Subscribe(OnGuardUnaware)
    ############################################################################################################
    ############################################################################################################

#>    <#
# A Verse-authored creative device that can be placed in a level
NpcSystem / Npc System Controller verse-source
# Subscribe to the NPC Spawner Device SpawnedEvent and all to an array of NPCSubscriptions that can be cancelled on En
        NPCEvents.SubAdd(SpawnerDevice.SpawnedEvent.Subscribe(OnNPCSpawned))
        NPCEvents.SubAdd(SpawnerDevice.EliminatedEvent.Subscribe(OnNPCEliminated))
        NPCEvents.SubAdd(SpawnerDevice.EliminatedEvent.Subscribe(NPCAudio.OnGuardEliminated))
        #SpawnerDevice.SuspiciousEvent.Subscribe(OnGuardSuspicious)
        # SpawnerDevice.AlertedEvent.Subscribe(OnGuardAlerted)
        #SpawnerDevice.TargetLostEvent.Subscribe(OnGuardLostTarget)
        # SpawnerDevice.UnawareEvent.Subscribe(OnGuardUnaware)

    OnNPCEliminated(AIInteractionResult:device_ai_interaction_result):void=
        # This function runs when the character spawned from the NPC Spawner is Eliminated.
        #if (EliminatedNPC := AIInteractionResult.Target?):
        #    set NPCEvents.AllNPCs -= array{EliminatedNPC} # https://forums.unrealengine.com/t/how-to-remove-an-item-at-index-from-an-array-in-verse/833744
Managers / Zombie Game Manager verse-source
# Subscribe to the NPC Spawner Device SpawnedEvent and all to an array of NPCSubscriptions that can be cancelled on En
        NPCEvents.SubAdd(SpawnerDevice.SpawnedEvent.Subscribe(OnNPCSpawned))
        NPCEvents.SubAdd(SpawnerDevice.EliminatedEvent.Subscribe(OnNPCEliminated))
        NPCEvents.SubAdd(SpawnerDevice.EliminatedEvent.Subscribe(NPCAudio.OnGuardEliminated))
        #SpawnerDevice.SuspiciousEvent.Subscribe(OnGuardSuspicious)
        # SpawnerDevice.AlertedEvent.Subscribe(OnGuardAlerted)
        #SpawnerDevice.TargetLostEvent.Subscribe(OnGuardLostTarget)
        # SpawnerDevice.UnawareEvent.Subscribe(OnGuardUnaware)

    OnNPCEliminated(AIInteractionResult:device_ai_interaction_result):void=
        # This function runs when the character spawned from the NPC Spawner is Eliminated.
        #if (EliminatedNPC := AIInteractionResult.Target?):
        #    set NPCEvents.AllNPCs -= array{EliminatedNPC} # https://forums.unrealengine.com/t/how-to-remove-an-item-at-index-from-an-array-in-verse/833744