-1

ok so I had a enemy spawner that spawns in a random enemy at a random spawn point which is what I wanted kind of but I wanted it to be a spawn point that spawned in a random enemy every 10 seconds but it was on a mouse click I tried doing it myself but F***ed it up so now I have nothing basically what I'm asking is can someone pls make me a script that after 10 seconds spawns in a few random enemies at designated locations pls I am completely lost and give up for now

Carson
  • 1
  • Split up and research this in individual steps: 1. [How to make the script wait/sleep in a simple way in unity](https://stackoverflow.com/questions/30056471/how-to-make-the-script-wait-sleep-in-a-simple-way-in-unity); 2. [How to access random item in list](https://stackoverflow.com/questions/2019417/how-to-access-random-item-in-list) – derHugo Jan 27 '22 at 11:31
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Feb 05 '22 at 04:12

1 Answers1

0

As per stackoverflows rules and common ideals, i wont give you the code, but id try looking around at modulo operators and the time.time() result, if(time.time() % TIME == 0){} will generally return true every TIME seconds.

Dabuilda
  • 11
  • 4