How do I control where enemies spawn?

Hi there,

I have an empty game object that I am using as an enemy spawner/setup and I was wondering how I can spawn enemies in different places, without moving the game object? Sometimes I want more than one object spawned at a time and I don’t want to fill the game with spawners that I have to keep track of…

I’m using the basic Instantiate(Enemy02v2, transform.position, transform.rotation); command.

I found that using animations was one way but I’d prefer to control enemy movement through scripting :wink:

Any help would be greatly appreciated :slight_smile:

For anyone else with this issue, I used the following:

Instantiate( Enemy01, transform.position + ( transform.right * 10), transform.rotation );

The “right” can be replaced with “up”, or “forward” and you can move left, down and backwards by prefixing with -. Easier than I thought :slight_smile: