# Trying to Access tags

**URL:** <https://forums.unrealengine.com/t/trying-to-access-tags/2431844>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, bug-report, editor, question\
**Created:** [March 31, 2025, 1:52pm UTC](https://forums.unrealengine.com/t/trying-to-access-tags/2431844 "2025-03-31T13:52:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_nazzy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@\_nazzy](https://forums.unrealengine.com/u/_nazzy)\
**Post date:** [March 31, 2025, 1:52pm UTC](https://forums.unrealengine.com/t/trying-to-access-tags/2431844/1 "2025-03-31T13:52:45Z")

</div>

Having a little trouble understanding tags, I’m trying to access player spawners by assigning them tags. At the moment I have an object in game manager called PS1 and its assigned to one player spawner. Im trying to make that same player spawner accessible through a tag rather than through its object declaration.

For example, im trying to access all spawners with the tag ‘spawners’ however I cant seem to access my OnPlayerDamaged or maybe OnPlayerSpawned function without having that original PS1 object declaration.

spawner := class(tag){}

GameManager := class(creative\_device):

```
@editable
# constant or variable
PS1:player_spawner_device = player_spawner_device{}

```

InitSpawners():void=  
Spawners := GetCreativeObjectsWithTag(spawner{})

for(Obj: Spawners):  
#loops through each spawner

```
        if(Spawner := player_spawner_device[Obj]):
            #Then checks if its a valid spawner

            Spawner.SpawnedEvent.Subscribe(OnPlayerSpawned)

```

OnPlayerSpawned(Agent:agent):void=  
if(FC:=Agent.GetFortCharacter):  
#Provides access to different fortnite attributes, like the damage event

```
        FC.DamagedEvent().Subscribe(OnPlayerDamaged)
        #when player gets damaged, go to the damaged function.

```

Any tips help, thank you

Edit: I might’ve solved it, i think i just have to call in InitSpawners() in my OnBegin function to actually start the event
