Random Generation
I am working on a 2d game and I need the enemies to spawn randomly. It is a top down movement game .
Answer by streeetwalker · Apr 12, 2020 at 09:24 AM
@csprogrammer, Use Random.Range to generate the x and y locations you need to spawn the enemys at, and spawn them in a coroutine that uses yeld return WaitForSeconds( Random.Range ) to actually spawn them at random points in time.
Google those bold terms that and you'll find a ton of resources that will get you on the road.
Your answer
Follow this Question
Related Questions
Enemy AI Script Error 0 Answers
How to make my enemy move in random direction while facing the player 0 Answers
Tile-based Enemy AI issue 0 Answers
How to make a Companion AI for a top-down 2D type of game? 0 Answers
2d Sprite creation at 0,0,0 with camera at 0,0,0 but renders wayyy off screen 0 Answers