Need help. Problem with spawning pickup items

Good day. I’ve encountered an issue with spawn inside the app I’m currently writting (endless runner).

The objective: on three lines appears a various amount of coins, from 2 to 8. I need to add special red one’s, from 0 to 1. In that case, when the level is passed, the player should see up to 8 normal and 1 red coins.

What I’ve already done (logic on screenshot):

  • In the blueprint’s I’ve added the coint spawn points.
  • In the logic of the level I’ve added 3 functions for uniting spawn points in array.
  • Added functions which spawn the random variety of coins at the spawn points from array.

The issue is:
After adding spawn points for red coin, instead it sometime shares a spot with normal one (problem on screenshot).

Would you please help me solve my issue.

Logic

Error

P.S. sorry for my bad english, my mother language is russian :slight_smile:

Remember that each time the for loop fires a new random point is generated the parameters. There is no rule that says it can’t generate the same point twice. Rather add a variable to your spawn points the gets ticked when a coin is spawned at that location. Then check that Boolean each time you want to spawn something.

Thanks for the advice. I’ll try to add a variable and accomplish your goal as a result of.