- Home /
Play sound when looking at enemy?
as title says. Plz tell me how to do this :)
Not a good question.
: http://answers.unity3d.com/questions/133869/how-to-ask-a-good-question.html
: http://answers.unity3d.com/page/faq.html
Why don't you just search Slender on this 'site. There have been alot of these questions since that game (and I thought it was Dr Who and the Weeping Angels that started these questions!)
http://lmgtfy.com/?q=how+to+play+a+sound+in+unity
http://lmgtfy.com/?q=how+to+cast+a+ray+in+unity
more then you deserve for such a question.
Just so it cannot be said that I wasn't constructive or helpful :
http://answers.unity3d.com/questions/287355/slender-like-game.html
http://answers.unity3d.com/questions/296068/how-to-make-a-slender-man-follow-character-script.html
http://forum.unity3d.com/threads/134862-Slender-$$anonymous$$an-Design-Outline
http://forum.unity3d.com/threads/141488-Slender-Beta-0.9
http://forum.unity3d.com/threads/138399-Slender-$$anonymous$$an-WIP
It's up to you to find the useful information among that. Read.
Break it down to one simple thing. Work out how to find if one object can "see" another. Once you do that, you can make it do anything you like with that as a trigger. And you can do it both for the player and the 'man' .
Answer by DaveA · Sep 21, 2012 at 10:22 PM
http://docs.unity3d.com/Documentation/ScriptReference/Renderer-isVisible.html and http://docs.unity3d.com/Documentation/ScriptReference/AudioSource.Play.html