How to fill an array in a parent creative_device with children of type AudioPlayer

How to fill an array in a parent creative_device with children of type AudioPlayer. I am new to Verse, so any pointers, or links to examples would be very helpful and much appreciated

To be honest, not fully sure what you mean by a “parent” audio device. But hopefully this should get you started.

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }

AudioPlayerArray_device := class(creative_device):

    @editable AudioPlayer1 : audio_player_device = audio_player_device{}
    @editable AudioPlayer2 : audio_player_device = audio_player_device{}
    @editable AudioPlayer3 : audio_player_device = audio_player_device{}

    var AudioPlayerArray : []audio_player_device = array{}

    OnBegin<override>()<suspends>:void=
        set AudioPlayerArray = array{AudioPlayer1, AudioPlayer2, AudioPlayer3}
    

At least for now you can’t access child or attached object in the editor vis Verse. You can only get a reference vía @editable or use tag to get the refferences

1 Like

Thanks!

By Parent, I am imagining an actor with audioPlayer actors in its subgraph. Thanks for your code suggestion.