Announcement

Collapse
No announcement yet.

For Each Loop: Sequentially Spawn Actors from Array

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    For Each Loop: Sequentially Spawn Actors from Array

    Hi I'm working on a simple game for some VR research I'm conducting and I'm stuck.

    The goal is to have an actor spawn for a set period of time, during which our player can make a simple button press and release (I want the timing data), and then that's one trial. One trial per actor, with the goal of have hundreds of actors.

    I made an actor array with 4 cubes and that I shuffle the order for each player. The issue I'm having is that I want to spawn my actors from my array sequentially and I cannot figure out how to do that. Any help would be greatly appreciated!

    EDIT: I found a solution!

    Following a tutorial I found on Youtube (link below) I made a For Each Loop w/Delay. Now I need to figure out how to access Event logs & add a few branch statements to control spawn related things.

    Attached Files
    Last edited by DrSpencerSpencer; 01-13-2021, 03:55 PM.

    #2
    Create a function that shuffles the array and sets it. execute the func on Z press, then loop.

    Z -> Func Shuffle array (my actor array) -> Loop (my actor array).

    Comment

    Working...
    X