# Example on how to Spawn and Destroy Props using Verse

**URL:** <https://forums.unrealengine.com/t/example-on-how-to-spawn-and-destroy-props-using-verse/687648>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite\
**Created:** [November 10, 2022, 1:46am UTC](https://forums.unrealengine.com/t/example-on-how-to-spawn-and-destroy-props-using-verse/687648 "2022-11-10T01:46:15Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rodney\_Houle](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rodney_houle/32/924275_2.png) [@Rodney\_Houle](https://forums.unrealengine.com/u/Rodney_Houle)\
**Post date:** [November 10, 2022, 1:46am UTC](https://forums.unrealengine.com/t/example-on-how-to-spawn-and-destroy-props-using-verse/687648/1 "2022-11-10T01:46:15Z")

</div>

There is now the ability to spawn and destroy props at runtime using Verse! Here is a quick example of a script spawning a prop, waiting 1 second, then destroying the prop:

```auto
using { /Fortnite.com/Devices }
using { /Verse.org/Native }
using { /Verse.org/Simulation }
using { /Verse.org/Random }
using { /EpicGames.com/Temporary/Diagnostics }
using { /EpicGames.com/Temporary/SpatialMath }

log_prop_spawner_device := class(log_channel){}

prop_spawner_device := class(creative_device):
    Logger:log = log{Channel:=log_prop_spawner_device}

    # Reference to a single creative_prop_asset
    @editable
    var ChairProp:creative_prop_asset := DefaultCreativePropAsset

    # Reference to a creative_prop_asset array
    @editable
    var ChairProps:[]creative_prop_asset := array{}

    # Runs when the device is started in a running game
    OnBegin<override>()<suspends>:void=
        Sleep (3.0)
        SpawnChairProps()

    # Spawn and destroy chair props
    SpawnChairProps()<suspends>:void=
        SpawnPosition:vector3 := vector3{X:=0.0, Y:=-700.0, Z:= 0.0}
        
        for ( Prop : ChairProps):
            SpawnedProp := SpawnProp(Prop, SpawnPosition, IdentityRotation())
            Sleep(1.0)
            if (CreativeProp := SpawnedProp(0)?):
                CreativeProp.Dispose()

```

[https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/0/8/a084962b3eb35e46afc02e42415290b318ed0e0d.mp4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/0/8/a084962b3eb35e46afc02e42415290b318ed0e0d.mp4)

---

<div class="post-metadata">

**Author:** ![BrendannnD](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BrendannnD](https://forums.unrealengine.com/u/BrendannnD)\
**Post date:** [November 10, 2022, 1:50am UTC](https://forums.unrealengine.com/t/example-on-how-to-spawn-and-destroy-props-using-verse/687648/2 "2022-11-10T01:50:10Z")

</div>

This is so useful! Thanks for sharing!

---

<div class="post-metadata">

**Author:** ![JKingpin](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jkingpin/32/924238_2.png) [@JKingpin](https://forums.unrealengine.com/u/JKingpin)\
**Post date:** [November 10, 2022, 2:29am UTC](https://forums.unrealengine.com/t/example-on-how-to-spawn-and-destroy-props-using-verse/687648/3 "2022-11-10T02:29:51Z")

</div>

The code is so clean and effective. There’s a lot of power here.

---

<div class="post-metadata">

**Author:** ![Fresnella](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/fresnella/32/735700_2.png) [@Fresnella](https://forums.unrealengine.com/u/Fresnella)\
**Post date:** [November 10, 2022, 2:39am UTC](https://forums.unrealengine.com/t/example-on-how-to-spawn-and-destroy-props-using-verse/687648/4 "2022-11-10T02:39:54Z")

</div>

Oh wow this is awesome! 😮 😍 I’ve been looking forward to this feature for a while, thanks for adding it! Does this work with custom Building Props made with imported or modeled assets, or is it only for Fortnite props at the moment?

Also would you be willing to add this script to the Snippets library? I think people would appreciate finding it there.

---

<div class="post-metadata">

**Author:** ![AxelCapek](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/axelcapek/32/950074_2.png) [@AxelCapek](https://forums.unrealengine.com/u/AxelCapek)\
**Post date:** [November 10, 2022, 2:18pm UTC](https://forums.unrealengine.com/t/example-on-how-to-spawn-and-destroy-props-using-verse/687648/5 "2022-11-10T14:18:59Z")

</div>

I’ve been waiting for this! Nice 🙂

---

<div class="post-metadata">

**Author:** ![Rodney\_Houle](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rodney_houle/32/924275_2.png) [@Rodney\_Houle](https://forums.unrealengine.com/u/Rodney_Houle)\
**Post date:** [November 10, 2022, 4:55pm UTC](https://forums.unrealengine.com/t/example-on-how-to-spawn-and-destroy-props-using-verse/687648/6 "2022-11-10T16:55:09Z")

</div>

For now it only works with Fortnite props.

---

<div class="post-metadata">

**Author:** ![JKingpin](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jkingpin/32/924238_2.png) [@JKingpin](https://forums.unrealengine.com/u/JKingpin)\
**Post date:** [November 10, 2022, 10:36pm UTC](https://forums.unrealengine.com/t/example-on-how-to-spawn-and-destroy-props-using-verse/687648/7 "2022-11-10T22:36:53Z")

</div>

There’s a Snippets library? Please point me to it.

---

<div class="post-metadata">

**Author:** ![JKingpin](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jkingpin/32/924238_2.png) [@JKingpin](https://forums.unrealengine.com/u/JKingpin)\
**Post date:** [November 10, 2022, 10:38pm UTC](https://forums.unrealengine.com/t/example-on-how-to-spawn-and-destroy-props-using-verse/687648/8 "2022-11-10T22:38:07Z")

</div>

OMG! Thanks for this!

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/8/8/088d2c911d524c6ba5507120b205bd367eb1e82b.png)

---

<div class="post-metadata">

**Author:** ![Fresnella](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/fresnella/32/735700_2.png) [@Fresnella](https://forums.unrealengine.com/u/Fresnella)\
**Post date:** [November 11, 2022, 12:05am UTC](https://forums.unrealengine.com/t/example-on-how-to-spawn-and-destroy-props-using-verse/687648/9 "2022-11-11T00:05:01Z")

</div>

No problem! It’s still new so there’s not much there but I hope to see more snippets soon! This reminds me I have to update my Day/Night Cycle snippet. I wrote it before Verse supported the Skydome Device so I had written a bunch of comments in it being like “pretend you can use the Skydome Device”. 😆 I want to add more snippets when I get a chance.

---

<div class="post-metadata">

**Author:** ![4ndreDe](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/4ndrede/32/980987_2.png) [@4ndreDe](https://forums.unrealengine.com/u/4ndreDe)\
**Post date:** [December 8, 2023, 9:50am UTC](https://forums.unrealengine.com/t/example-on-how-to-spawn-and-destroy-props-using-verse/687648/10 "2023-12-08T09:50:02Z")

</div>

Thx for that, but is it also possible to spawn creative\_prop objects?  
I got a blueprint that i need multiple times. 🙂

---

<div class="post-metadata">

**Author:** ![Proxying](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Proxying](https://forums.unrealengine.com/u/Proxying)\
**Post date:** [December 8, 2023, 3:28pm UTC](https://forums.unrealengine.com/t/example-on-how-to-spawn-and-destroy-props-using-verse/687648/11 "2023-12-08T15:28:14Z")

</div>

Yes, you can spawn up to 100 (Maybe now 300/500/1000) per creative\_device using the same prop asset, or different ones. Just using the same code as posted above

---

<div class="post-metadata">

**Author:** ![sir\_axe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sir\_axe](https://forums.unrealengine.com/u/sir_axe)\
**Post date:** [December 20, 2023, 5:49am UTC](https://forums.unrealengine.com/t/example-on-how-to-spawn-and-destroy-props-using-verse/687648/12 "2023-12-20T05:49:08Z")

</div>

That great but why only creative\_prop\_asset ?  
I don’t get why there’s such limits on basic functionality on all other classes …

---

<div class="post-metadata">

**Author:** ![ManualPotato](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/manualpotato/32/1144902_2.png) [@ManualPotato](https://forums.unrealengine.com/u/ManualPotato)\
**Post date:** [December 20, 2023, 8:54am UTC](https://forums.unrealengine.com/t/example-on-how-to-spawn-and-destroy-props-using-verse/687648/13 "2023-12-20T08:54:42Z")

</div>

My guess is they haven’t figured out how to manage the automated island memory limit test with dynamically instanced UEFN devices (yet (hopefully)).

---

<div class="post-metadata">

**Author:** ![sir\_axe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sir\_axe](https://forums.unrealengine.com/u/sir_axe)\
**Post date:** [December 20, 2023, 3:54pm UTC](https://forums.unrealengine.com/t/example-on-how-to-spawn-and-destroy-props-using-verse/687648/14 "2023-12-20T15:54:21Z")

</div>

hmm you might be right , as it does run on their servers and you can’t test for that in stress test before publishing atm

---

<div class="post-metadata">

**Author:** ![MaximumSponge](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/maximumsponge/32/964866_2.png) [@MaximumSponge](https://forums.unrealengine.com/u/MaximumSponge)\
**Post date:** [January 10, 2024, 1:19am UTC](https://forums.unrealengine.com/t/example-on-how-to-spawn-and-destroy-props-using-verse/687648/15 "2024-01-10T01:19:07Z")

</div>

Thank you for this example! I wasn’t finding very good resources on how to manage an array with creative\_prop and this got be going. Much appreciated!
