So I have created an Ai for a student project. I followed the limited series of tutorials on the internet, I was able to create an Ai that sees and follows the player. I then created a trigger that the player can hide in to avoid the AI. When the player enters that trigger the Entity on him is deactivated. When he leaves the trigger it is reactivated. The problem with this is that I don’t want the Ai to not be able to see the player if he sees him entering the trigger. So I created a custom action called detected in the behavior tree. This makes a bool called detected switch from true to false. It works but now I want to reference that variable in normal monobehavior unity scripts. I’m really stumped here and after a lengthy but unproductive google search session I could use some help.
P.S I haven’t been able to find many tutorials for Rain. I also can’t download the example projects from the main site. If anybody has extra information on that I would be very greatful.
Skip Rain And write your own AI using Unity.AI; in your header of your MonoBehaviour script . Also, utilize enums. I had the same problem when I first started trying to use rain. I, of course, got no help when I reached out. The way I learned was from buying books and researching AI components in Unity. I can show you have to merge some finite state machines with a behavior tree and accomplish an effective AI for whichever character using just C# and Unity.