Alright so im at the end of my argon assault and all thats left is making my boss. I wanted to try something and make it so that while you fighting/chasing the boss he lays down mines as u chase them ( mines just being spheres that i painted) now i have two ways of doing this. I can either make a regular timeline of him and then make a Time line of the mines that will be timed so it seems like hes spawning them behind him while you chase. OR i could make it so that these mines spawn at his current location every few seconds (every 3 seconds or something) but the problem with that is im not sure what code words and such i need to use. I feel like ive done something like this before using instantiate but i cant remember. help would be appreciated
…
public class CreateMines : MonoBehaviour
{
public GameObject ProjectilePrefab;
public float spawnTime = 1f;
private void spawnOnBoss()
{
GameObject Mine = Instantiate(ProjectilePrefab) as GameObject;
Mine.transform.position = new Vector3(gameObject.position);
}
…
This was as far as my mind let me go i didnt know what to do after this. i was trying to put the mines new position on the ship but it doesnt look like you can do it like this with vector3s