|
Post by projectonegames on Aug 24, 2016 15:31:16 GMT
V_AI Sphere Sensor
it would be great if this component allowed you to optionally play a sound when it is triggered.
Set a specific audio sound in the inspector. Trigger one time only or every time it is triggered. To play it X times. (1 or 2 or whatever)
Use case: When an enemy or boss sees you, they make some kind of sound the first time they see you. If you run away and come back, they may or may not make the sound again.
I don't think I should modify it on my end, because it will be overwritten in the next release. (?)
quick question. "tags to detect" is used to sense anyone with a specific tag. Player and CompanionAI for example. "targets in area" is the same thing, only it is only for specifically named transforms, like the "3rdpersonController" ? I am trying to think if I will ever need that.
|
|
|
Post by Invector on Aug 26, 2016 13:49:00 GMT
It's really simple, just open the AI_Controller and find the method SetTarget(), add your audiosource to play over there when he detects a target. You can add a comment like "// MY MOD" to be easier to update later.
Targets in area is a list that the tags to detect filter the tag and add.
|
|
|
Post by projectonegames on Aug 26, 2016 18:26:01 GMT
Thank you, that works of course. I will put in comments for // My Mod whenever I change the scripts.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 4, 2016 4:12:10 GMT
|
|