Quantcast
Channel: Questions in topic: "spawn points"
Viewing all articles
Browse latest Browse all 102

Spawn multiple enemies from spawn point

$
0
0
Hello, I have a simple spawn script but when I added the var enemy2 : Game Object, it does not want to spawn enemy 2. It will only spawn enemy 1. var Enemy : GameObject; var Enemy2 : GameObject; var Enemy3 : GameObject; var Enemy4 : GameObject; var SpawnPoint : GameObject; //spawn enemy starting in 1 second every 5 seconds InvokeRepeating("SpawnEnemy", 1, 5); function SpawnEnemy() { Instantiate (Enemy, SpawnPoint.transform.position, Quaternion.identity); } As you can see I have 4 different enemies to spawn but it will only spawn enemy 1. Sorry I am new to this and learning. Thank you.

Viewing all articles
Browse latest Browse all 102

Trending Articles



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