# How to get a device class from "creative\_object\_interface"?

**URL:** <https://forums.unrealengine.com/t/how-to-get-a-device-class-from-creative-object-interface/1217398>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [July 2, 2023, 6:07pm UTC](https://forums.unrealengine.com/t/how-to-get-a-device-class-from-creative-object-interface/1217398 "2023-07-02T18:07:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![WesLee1991](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@WesLee1991](https://forums.unrealengine.com/u/WesLee1991)\
**Post date:** [July 2, 2023, 6:07pm UTC](https://forums.unrealengine.com/t/how-to-get-a-device-class-from-creative-object-interface/1217398/1 "2023-07-02T18:07:49Z")

</div>

I have doors with lock devices on them in the level, I have tagged all the locks with “door\_lock” and want to lock/unlock via verse;

```auto
    UnlockAllDoors():void=
        # Get all the players in the experience.
        AllPlayers := GetPlayspace().GetPlayers()

        for:
            TaggedDevice : GetCreativeObjectsWithTag( door_lock{} ),
            DoorLock := TaggedDevice,
            FirstAgent := AllPlayers[0]
        do:
            DoorLock.Unlock(FirstAgent)

```

However I do not know how to reference the lock\_device class to call `Unlock` -

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/2/d/f2d3619e9222297fc4cc085226fb7f53f750146a.png)

Does anyone know what I am missing?

---

<div class="post-metadata">

**Author:** ![im\_a\_lama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/im_a_lama/32/995063_2.png) [@im\_a\_lama](https://forums.unrealengine.com/u/im_a_lama)\
**Post date:** [July 2, 2023, 7:17pm UTC](https://forums.unrealengine.com/t/how-to-get-a-device-class-from-creative-object-interface/1217398/2 "2023-07-02T19:17:15Z")

</div>

Hey, you have to cast it to a `lock_device` before :

```auto
for:
    TaggedDevice : GetCreativeObjectsWithTag( door_lock{} ),
    DoorLock := lock_device[TaggedDevice], # this line
    FirstAgent := AllPlayers[0]

```

I think they already show that somewhere in the [Gameplay Tags](https://dev.epicgames.com/documentation/en-us/uefn/gameplay-tags-in-verse) article 🙂

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [August 1, 2023, 7:17pm UTC](https://forums.unrealengine.com/t/how-to-get-a-device-class-from-creative-object-interface/1217398/3 "2023-08-01T19:17:49Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
