# Access device components in verse script

**URL:** <https://forums.unrealengine.com/t/access-device-components-in-verse-script/1163347>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [May 12, 2023, 8:06am UTC](https://forums.unrealengine.com/t/access-device-components-in-verse-script/1163347 "2023-05-12T08:06:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mapshot\_Agency](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mapshot_agency/32/700660_2.png) [@Mapshot\_Agency](https://forums.unrealengine.com/u/Mapshot_Agency)\
**Post date:** [May 12, 2023, 8:06am UTC](https://forums.unrealengine.com/t/access-device-components-in-verse-script/1163347/1 "2023-05-12T08:06:43Z")

</div>

Hi,

I’m trying to spawn given meshes and have them move towards an endpoint. I have the spawning and moving logic working but I wanted to define the startpoint and endpoint by adding simple cube staticmeshes onto the device and using their translation as the points I need.

Is there a way to access the device/actor components, for example a static mesh, from inside the verse script?

I know I can make an @editable field and just add a staticmesh to that so I can use the object in verse scripting but I prefer using the “cleaner” method of having everything I need already on the device.

Thanks!

---

<div class="post-metadata">

**Author:** ![Knight\_Breaker](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/knight_breaker/32/1194711_2.png) [@Knight\_Breaker](https://forums.unrealengine.com/u/Knight_Breaker)\
**Post date:** [May 12, 2023, 5:08pm UTC](https://forums.unrealengine.com/t/access-device-components-in-verse-script/1163347/2 "2023-05-12T17:08:23Z")

</div>

It’s impossible to reference props without an editable configuration. Also a small nit, it’s props not static meshes that you can link and move around with a Verse script.

What is “cleaner” by your imagination, I’m curious?!

---

<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:** [May 12, 2023, 8:15pm UTC](https://forums.unrealengine.com/t/access-device-components-in-verse-script/1163347/3 "2023-05-12T20:15:09Z")

</div>

You can’t access your device children if that’s what you’re looking for.

In UEFN, you’ll have to use the @editable specifier as you said, but you’ll need to find what kind of asset you want to use…

You said you already made the moving system, but maybe using a sequencer could be an alternative for you ?

If you want another way to do so, you could use Verse gameplay tags and retrieve your objects like this :

```auto
GetCreativeObjectsWithTag<native><public>(Tag:tag)<transacts>:[]creative_object_interface

```

Also, I just noticed that you can add those tags to static meshes 🙂

EDIT: I can’t guarantee that your objects will be returned in the good order, you could compare distances from origin point maybe ? (which makes this solution less clean actually 🤔)

---

<div class="post-metadata">

**Author:** ![Mapshot\_Agency](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mapshot_agency/32/700660_2.png) [@Mapshot\_Agency](https://forums.unrealengine.com/u/Mapshot_Agency)\
**Post date:** [May 15, 2023, 7:38am UTC](https://forums.unrealengine.com/t/access-device-components-in-verse-script/1163347/4 "2023-05-15T07:38:39Z")

</div>

Well a “clean” solution in my mind is simply when all the necessary components are all encapsulated in the same object. So in my example that would be when I drag my “ObjectSpawner” device in the scene in UEFN, I would see my start- and endpoint as meshes I can position where I want them. Instead now I have my device and 2 completely seperate meshes that I link through an @editable field to my device.

I’ve also tried tags @im_a_lama, but I couldn’t get it to work. I couldn’t even print the position of the mesh I gave a tag. The documentation code for this didn’t work. When I have some more time I’ll play around some more with it.

Anyhow, thanks for the responses!
