I'm creating a game in which, when I start the layout, I need exactly 9 collectibles to appear randomly in 9 of the 28 triggers scattered around the map.
To consider:
• Whenever the layout is started, the collectibles should appear in different locations. Therefore, their position should be randomly drawn at each layout start.
• I created 28 triggers in total, all of which are copies. Each trigger is a sprite with a solid color, and these sprites are scattered all over the map. The collectibles should be placed on these triggers.
• Exactly 9 collectibles need to appear, randomly positioned on 9 of the 28 triggers.
In short, the idea is that, when the layout starts, the game draws 9 triggers out of the 28 that exist and places a collectible item on each of these 9 drawn triggers.