Verse: FindCreativeObjectsWithTag should be able to function within modules

For anyone struggling with this, here is my workaround, it’s working for now but it might stop working in the future, I don’t know.

Declare this in module scope:

var WorkaroundForTaggedObjects : weak_map(session, creative_device) = map{}

FindObjectsWithTag(search_tag:tag)<transacts>:[]creative_object_interface=
    var ObjectsArray : []creative_object_interface = array{}

    if:
        Session := GetSession()
        CreativeDevice := WorkaroundForTaggedObjects[Session]
    then:
        TaggedObjects := CreativeDevice.FindCreativeObjectsWithTag(search_tag)

        for(Object:TaggedObjects):
            set ObjectsArray += array{Object}

    return ObjectsArray

And then in your game controller class add this in the OnBegin method:

game_controller := class(creative_device):
    OnBegin<override>()<suspends>:void=
        Session := GetSession()

        if:
            set WorkaroundForTaggedObjects[Session] = Self

Then, when you want to get your tagged objects you just call:

TaggedObjects := FindObjectsWithTag(my_tag{})