#So you have the enemy collide with

1 messages · Page 1 of 1 (latest)

serene pewter
#

How would that be done, sorry kind of new to this stuff 😄

#

Sound a bit to complicated no?

#

@loud nova

loud nova
#

You have some sort of enemy manager script that has a list of all enemies

serene pewter
#

Ok.

loud nova
#

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

serene pewter
serene pewter
loud nova
#

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