Despite 2 devices with the tag are in the map I got 0 devices with this code :
# This function runs when the NPC is spawned in the world and ready to follow a behavior.
OnBegin<override>()<suspends>:void =
if:
# Get the Agent (the NPC).
Agent := GetAgent[]
# Gets the Fortnite Character interface, which gets you access to its gameplay data
# including its AI module for navigation and focus.
Character := Agent.GetFortCharacter[]
# Get the Navigatable Interface, this allows you to tell it to move.
Navigatable := Character.GetNavigatable[]
# Get the Focus Interface, this allows you to tell it to look at something or somewhere.
Focus := Character.GetFocusInterface[]
then:
TagGenerator := FindCreativeObjectsWithTag(PADTag{})
for(Element:TagGenerator, PAD:=player_light_device[Element]):
Print("Adding player_light_device")
set PlayerAttachmentDevices = PlayerAttachmentDevices + array{PAD}
Print("player_light_device count = " + ToString(PlayerAttachmentDevices.Length))
Blockquote
Generates a creative_object_interface for every creative object that has been marked with the specified Tag. Will not find anything if called on an npc_behavior that is not simulating.
Blockquote
Does it work when you try to access those devices outside of the NPC behavior using the (:creative_device_base).FindCreativeObjectsWithTag(:tag) method instead
The behavior method was just added during last update maybe it’s broken idk