Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

How would I create a script that spawns objects more frequently as time goes on?

$
0
0
For my game, I have an enemy that works perfectly. Now how would I make a mode, in which the enemy spawns maybe 1 for the first minute, then 20 at the twentieth minute. So that every minute, the spawn goes up 1 or 2. I have no idea where to start with a script like this, so any help would be appreciated. I assume it would be with Instantiate and Invoke, I don't think this is the answer but here is an Idea I have: Instead of normally spawning, like: InvokeRepeating("Spawnenemy", 5) would InvokeRepeting("Spawnenemy", Variablethatgoesup) work?

Viewing all articles
Browse latest Browse all 171066


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>