Create actor randomly

8022apple

  • Posts: 19
Sorry for my poor english. My question is how do you create a different actor every time?
I mean Create random actor in the scene. Can anyone help me, please? Thank you

coleislazy

  • *
  • Posts: 2607
Like in my screenshot below. You'll need a List attribute, in which you'll add each actor type you want as text. You'll also need a Text attribute and an Actor Type attribute. Note the use of the internal names of the attributes in the code blocks. Its basically the same as the name you gave the attribute, minus any spaces and special characters and with an underscore in front of it.

Once you have the Actor Type attribute set, you can drop it into a "create actor" block like normal.

8022apple

  • Posts: 19
Thank you so much, Im so glad that there actually people willing to answer questions. Just another small question: Could you answer my other post about face direction of motion?

8022apple

  • Posts: 19
So is this how it should look like when I added to the scene?

coleislazy

  • *
  • Posts: 2607
Yes, that should work as long as you add the names of the actor types you want into the list (make sure the spelling and case matches!).

As to your other issue, I'm not familiar with that behavior, so I can't answer right now. I'll try to remember to take a look at it tomorrow, though.