Hello everyone, trying to make a game, i need to make a spawner spawns objects in four colors randomly when we click Fire1 button, in limit number for example 4 times red for time blue… Etc but randomly and the spawner shows the coming color or the next color, i tried many things but didn’t work for me. Any help plz.
Low-tech solution, just create an array with the number of elements you need, such as:
string[] colors = { "blue", "red", "red", "red", "red", "yellow", "yellow" };
Then randomly choose something from that array – you’ll get red 4 times more than blue, and you’ll get yellow half as much as red, etc.
Jay
thank you sir!