This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
Hi!
I am a total noob and I am doing a tutorial about spawning actors and destroying actors (Make Games with Kate, tutorial 7 - Make a garden). In the video it teaches how to spawn an actor from one class with the press of a button, as well as destroy all actors of that class within the collision box. That I could do and understand. As an extra assignment it tells to make 5 different flowers, of which one is randomly chosen to be spawned when the button is pressed. This I can't seem to get to work.
My original flower is called Flower. The others are (very originally) BlackFlower, BlueFlower, RedFlower, Whiteflower. My attempts to do the randomization have been:
1: Make all other variants child actors of Flower. I then tried making an array of all child actors, shuffling and then connecting it to the Spawn Actor. No luck.
2:Made all flowers have Actor Tag of 5Flowers and tried using Get All actors with Tag -> Shuffle. But Spawn Actor demands a class, so the array of actors won't connect.
I have been at it for a while. Can someone point me in the right direction? How do I organize the flowers so that I can randomize which class is given to the Spawn Actor component? Thanks!
Subreddit
Post Details
- Posted
- 3 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/unrealengin...