- Home /
Enemy appear / disappear
Hello. Does any of you know script of appearing and disappearing enemy (or object) ? I mean for example if someone walk, each time something appear in front of player for few seconds and disappear. I searched forums and I couldnt find this kind of script. If I found, it wasn't this what I was expecting.
Comment
Answer by hellaeon · Apr 10, 2013 at 01:51 PM
Hi mate,
I'm on the iPad so I can't give you the exact answer but try in your update method something like
my_timer = 0;
flash_time = 5.0f; // time you want object to disappear
my_timer += Time.fixedDeltaTime;
If (my_timer >= flash_time)
transform.gameObject.SetActive = false;
This will only turn it off, but should get you going...
Your answer
Follow this Question
Related Questions
Distance activated GUI 1 Answer
Make GUI box appear and disappear 2 Answers
I want to make text appear for a few seconds and then disappear. 2 Answers
Guitexture appear/disappear 1 Answer
object dissappear and reappear 1 Answer