News Forums RAIN Sample Projects, How To, and Code Referencing Custom Actions from Unity Script

This topic contains 2 replies, has 2 voices, and was last updated by  MorganM 4 weeks, 1 day ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #40835


    Hey guys!

    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.

    Thank you all so much for your time,

    It means a lot.




    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.

    Daniel Fisher



    I appreciate the help Daniel. I won’t say no to the promise of help. However, it does seem weird to me that this small task is impossible.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.