Quantcast
Channel: Questions in topic: "enemy"
Viewing all articles
Browse latest Browse all 1488

How can I spawn enemies while leaving a gap for the player to advance?

$
0
0
I'd like to have a grid that is 5 units wide that generates rows as the player moves forward. I want my player to advance one unit at a time, whether it's forward, backwards, or side to side. I also want to have 1-2 enemies spawn in each row of the grid without blocking off the player completely. For example, if you imagine a 5x5 grid, I don't want the first enemy to spawn on (1,1), the second on (2,2), the third on (3,3), fourth on (4,4) and fifth on (5,5) as that would make a diagonal line that doesn't allow the player to progress. For clarification, my player is unable to attack/destroy enemies, they simply have to avoid them. I know there has to be a way to do this, I just don't know what it is. I am using C#

Viewing all articles
Browse latest Browse all 1488

Trending Articles



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