First of all, let me explain:
I have an AI (Ethan Third Person AI) in my scene and I parented a “IsTrigger = True” Sphere to the AI GameObject
Now I wanted the script to get the Components of the AI so that I can change the speed value when the player enters and exits the sphere… (By OnEnterTrigger (Collider player) { if(tag == “Player”) } )
1.: The script is on the cube, not the AI
2.: I want to get the Walk and Anim Speed Variables, so that I can change them
3.: I have no idea how to solve this and I would be very happy if anyone could help me! (New to programming obviously)
I would be so happy if someone would show me a smarter way to solve this or… basically just help me with the script.
Sincerely,
Xanthum