Hello, Need help with a problem
Hey, im making a 2D game which player has to dodge objects that fall from sky in it. now what i want is an object that gets spawned randomly between two points of time, stay in the game for a period of time then gets destroyed... for instance:
game starts -> unity chooses a number between 1-10 -> number is 7 -> unity spawns my objects after waiting for 7 seconds ->object is in the game for 2seconds then objects gets destroyed-> after object was destroyed unity again chooses a number between 1-10 -> this time its 6 -> unity spawns my object -> etc.
Thank you, sry for bad English.
Answer by getyour411 · Sep 28, 2015 at 07:26 AM
Random.Range()
Destroy()
See may posts on 'Unity counter', 'Time delay', 'How to wait a few seconds', etc.
Your answer
Follow this Question
Related Questions
Random Object Selection 0 Answers
Random Number every 5 seconds 2 Answers
Random Object Spawn 0 Answers
PLEASE TELL ME WHAT IS WRONG HERE I RECIEVE THIS ERROR 1 Answer