Passing a Blueprint (Or other files) between Actors

I’m trying to find out if it’s possible to have a Blueprint with logic in it, but instead of having it be active, I can pass it as a reference or variable between Actors, that they can then access when they have a copy of it.

Is this possible? If not, would raw coding make possible outside of the current architecture?

Sounds like you want to create a blueprint Object class (not an Actor) which doesn’t exist in the game world but holds data values and can cause other things to happen etc. So create a Blueprint classand extend from Object but not Actor.

Aside from just casting to the other blueprints, maybe look into interfaces, these are often used to communicate between blueprints.

“The use of Blueprint Interfaces allows for a common method of interacting with multiple different types of objects that all share some specific functionality. This means you can have completely different types of objects, such as a car and a tree, that share one specific thing, like they can both be shot by weapon fire and take damage. By creating a Blueprint Interface that contains an OnTakeWeaponFire function, and having both the car and the tree implement that Blueprint Interface, you can treat the car and the tree as the same type and only call the OnTakeWeaponFire function when either of them is shot.”

Another common method is Structs, depending on exactly what you’re looking for (You mentioned variables) But you could use these if you’re communicating several different variables between blueprints (via casts or interfaces).

Do you mean you want to make an Actor that can stop being an actor in the world, disappear, and just be saved into a variable or a file for later, then retrieved and become an Actor in the world again?
for instance like a pick-up-able item in the world, which once it is picked up it doesn’t exist in the world but is in your inventory?

No. The basic idea is to take Game-AI related code / files and hold them in other places / actors to pass to the AI later. Instead of having my AI have code specific to say, a Weapon, the Weapon holds the code / logic that dictates how an AI behaves when it has this weapon.

Thus, to implement this in Unreal I’m looking for a method to have a Blueprint that I want an AI to use, instead be held by another object / actor and through interaction (Pick up items etc) the AI can retrieve it / access it / get a reference to it, thus allowing it to follow it’s logic.

So, I want a pick up on the ground that says, “AI, Go walk over there.” or “Go patrol between here and there”. and I’m curious to see if it’s possible and the best methods to achieve this.

Another thing you can do is to have several different AI controller classes, and when the pawn touches or equips the pickup, it gets Possessed by a different AI controller and therefore behaves differently. Remember the pawn is a body, but the controller is the mind, and you can swap minds at runtime!

Or if it’s just a few changes to behavior, you can simply have the pickup set certain variables that control the AI behavior tree and/or blackboard, to different values. Then the behavior tree will see those changes and go to different BT nodes etc.