Aaron
Junior vMember
Posts: 44
|
Post by Aaron on Sept 29, 2020 14:53:48 GMT
I need help with the FSM - I want to have my enemies see each other so that when one of them gets shot, they react to it, either to investigate the area and/or search for me when it happens. They react to audio clues just fine with the sound triggers I put on the shooter weapons, but I can't figure out how to make them react to things they see, such as an injured comrade. Any help would be appreciated.
|
|
|
Post by lelbaro on Jan 7, 2021 6:41:43 GMT
Hi Aaron, did you figured this out?
|
|
azul
Junior vMember
Posts: 38
|
Post by azul on Jan 12, 2021 15:02:23 GMT
Instead of using a FSM behavior, here are a couple of ways that I use the vNoiseObject script via the 'AI Shooter Controller' events to alert enemies is by first, adding a NoiseObject to your enemy AI. Make sure you have the right 'Max Distance' set so the sphere is large enough to encapsulate nearby AI. Then in the vControlAIShooter, look at the various 'Event' options: You could either use Check Health Events, and use something like, 'Less Than' to check the health of the AI (if their health falls bellow a certain number) and then On Check Health() you add the NoiseObject and TriggerNoise. This will alert nearby enemies if the AI is low on health. Or you could use On Receive Damage(vDamage) to TriggerNoise every time the AI is hit (which may be to often and could cause the nearby enemy to go into a 'Investigate Noise' loop). A away around the constant TriggerNoise in this instance is to create a randomize script which enables the game object with the TriggerNoise function in random intervals. Or finally you could use the On Dead (GameObject) event to TriggerNoise when the enemy dies to alert other AI.
|
|
Aaron
Junior vMember
Posts: 44
|
Post by Aaron on Feb 13, 2021 7:51:36 GMT
Thanks for this - Sorry I haven't been back in a while to see this but it looks like this could definitely work, especially the Noise Trigger on Death to alert nearby enemies. It's so simple, thank you for your reply.
|
|