- Home /
Enemy(sphere) spawn and die over time
Hey, so I was looking into using mesh (Sphere that has script to pursue "Player") as particles but all I found was "Write a PS" soooooooo I'm thinking of cheat ways of making one since I know nothing about "writing Particle systems".
So my question is: How do I spawn a sphere in my scene and then have it die after 5 sec (float)
I'll look into spawning a bit more, but I thought I'd ask here as to search in 2 places at once.
Just so you know why I'm trying to do this, I'm making a Sidescroller like Mario but the enemies rain down on you and they get in your way, cool part would be that you can use the enemies to jump off of if you can time it just right.
Answer by cagezero · Apr 28, 2013 at 08:40 PM
http://docs.unity3d.com/Documentation/ScriptReference/GameObject.CreatePrimitive.html
http://docs.unity3d.com/Documentation/ScriptReference/Object.Destroy.html
Did you try searching at all before you posted?
yes I did, I'm still looking. I don't want to create just any object, I want to spawn an object I already have in my scene multiple times. the reason being, the object has a script on it to pursue the player.
O$$anonymous$$. You will want to create a prefab of your object. Start here:
http://docs.unity3d.com/Documentation/$$anonymous$$anual/InstantiatingPrefabs.html
Your answer
Follow this Question
Related Questions
Simultaneous Hits 1 Answer
How to respawn items along with player 1 Answer
In My Multiplayer Game only he host Respawns when he dies 0 Answers
How can I create object using class? 1 Answer