- Home /
How make spawn for horror game?
Hello! Please help me . I am making horror game , but i don't know how make spawn . I want make a trigger zone , and if i stay in , object spawning and over some time disappear. Sorry i am speak littl english .
In advance thanks!
Be sure to post responses as comments, not answers, and accept answers that worked for you. I can't convert your answer (awaiting moderation at time of writing) to a comment because its too small.
Answer by HunterKrech · Mar 20, 2013 at 04:54 PM
Hey, so you should use the function OnTriggerStay(). Code would look something like
OnTriggerStay(collider: player) { if(player.gameObject.tag =="spawn") { Instantiate(enemy,position, rotation) }
Seething like that, it's pseudo code, but I hope it helps.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Is It Possible To Make A Launcher With Unity 1 Answer
Games and websites 1 Answer
How to pickup and equip an object? 0 Answers