Key trigger making an AI follow you and altering the AI's variables

My situation is that I want the player to go up to an AI, press a key (E for instance), and the AI follows the character until you get to some goal. I know about NavMeshs and Simple Move to Actor/Location, but I also need the AI’s variables to change when it starts following you. Anyone know how to do this cross-Blueprint thing?

You can use the Cast To node. First make sure the variable is public (yellow eye is open). Then in another blueprint get a reference to the AI you want to update the variables on and cast it to the AI’s Class (Whatever the blueprint is named) then drag out the as AIClass (your will be called different) and just type set variableName and you can update any variable you need just make sure you drag out from that as AIClass reference. Sorry if it’s not very clear I can post a picture when I get home. Let me know if you don’t understand anything. Good luck. :wink:

Variables are public, cast it to my Customer Class (the blueprint name is Customer, uses just the normal AIController), tried to drag out the As CustomerC (I assume it means to say As CustomerClass but doesn’t have the room), but when I type “set” it only comes up with “Set Blackboard Value as Class”. I’m assuming I did something wrong.

The stuff not on the screen in this blueprint is just about casting a line, the the stuff you can see is (what I assume you would already know) is just casting the line, making sure it’s the Customer, and making the Customer follow you. (This is the MyCharacter blueprint)

I got rid of the “Cast to Customer Class” thing and instead tried your method on the “Cast to Customer”'s “As CustomerC” and it let me actually put in the set variable thing I wanted. However, it still doesn’t seem to actually change it (the AI’s happiness is shown on my screen, and it didn’t go up).

Have a look and please try to help me fix this.

Nevermind about that last post, I figured that out, the problem was in the Customer blueprint. Consider this problem figured out (for now).