#So you have the enemy collide with
1 messages · Page 1 of 1 (latest)
How would that be done, sorry kind of new to this stuff 😄
Sound a bit to complicated no?
@loud nova
You have some sort of enemy manager script that has a list of all enemies
Ok.
You have a function on there that calls a Respawn method on each enemy
Each enemy has a reference to the one EnemyManager
And when that enemy hits something, it calls that function in EnemyManager
Respawnmethod = set to spawnlocation?
And that will make all reset.
Step 1: Create an Enemy script that has a Respawn function and an OnCollisionEnter
Step 2: Create an EnemyManager script that has a list of all Enemies
Step 3: Create a function on EnemyManager that loops through Enemies and calls Respawn
Step 4: Inside OnCollisionEnter on Enemy, call the function you made in step 3