- Home /
I want to make a certain sprite spawn somewhere periodically, how?
The sprite would spawn, move towards the sprite the player is controlling, and a set time after it spawns, a duplicate would spawn out of the same place the original did. No clue how to do this.
Answer by DiegoSLTS · Jun 11, 2015 at 01:01 AM
You probably want a coroutine to spawn the sprites periodically, look at this video of the Space Shooter tutorial for a reference: https://unity3d.com/learn/tutorials/projects/space-shooter/spawning-waves
If you're trying to make your own game and didn't follow any of the official tutorial I suggest you do that entire tutorial. It's outdated, but you can learn a lot from it anyway, just ignore the "displaying the score" class (the GUI system used was replaced) and note that some code might be invalid in Unity 5 (it's easy to fix them).
To make the sprites follow the player sprite look here: http://answers.unity3d.com/questions/26177/how-to-create-a-basic-follow-ai.html
Your answer
Follow this Question
Related Questions
Spawning sprite in for loop 1 Answer
Sprite image not changing 0 Answers
Strange artifacts in builds 0 Answers
Sprite Swapping help 1 Answer
Way to have 2D Sprites lit by Lights? 3 Answers