Verse: FindCreativeObjectsWithTag should be able to function within modules

I don’t know if its common knowledge ect but in the NPC class just add a editable device and ref that. That’s all i did and it works perfect without the need for all the extra workings. The device doesnt need to be connected to anything and it works.

This also works in a standard class but you need to ref any editable device and connect it to the verse device even if you are not using/needing a device just add one anyway

NPC CLASS

A Verse-authored NPC Behavior that can be used within an NPC Character Definition or a NPC Spawner device’s NPC Behavior Script Override.

Trail_Example := class(npc_behavior):

@editable
Button : button_device = button_device{}

# This function runs when the NPC is spawned in the world and ready to follow a behavior.
OnBegin<override>()<suspends>:void =
    TaggedList := Button.FindCreativeObjectsWithTag(YourTagNameHere{})

Further down in your code

for(MaybeTaggedActor : TaggedList):
if(Name :=Type[MaybeTaggedActor]):
# Do Something

NormalClass

for(FoundObject : Power_Settings.Mutator_Device.FindCreativeObjectsWithTag(YourTagNameHere{})):

uses the mutator as a relay to the creative device

          if(Name := Type[FoundObject]):

With a normal class the editable device in this case the Mutator needs to be connected to the verse device. If it isnt then it doesnt work.

Hope this helps some of you.

2 Likes