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.
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.
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.