Hello, I’m using the Blueprint example map from the marketplace to mess around and trying out some experiments.
Now I’m stuck with a problem with the Cast to function.
I want to read a boolean variable stored in an actor blueprint (at least I think it’s an actor blueprint, I created it dragging a mesh into the level and clicking the blue button Blueprint/Add Script on the details panel) from the BP_FPS_CharacterPawn.
When this bool is equal to zero, I don’t want to enable the inputs in the BP_FPS_CharacterPawn blueprint until it goes to 1.
I’m trying to cast this variable but I don’t know what to plug into the of the cast node.
I tried the get owner node but it doesn’t work (I assume it needs the reference of the actor, but how can I tell him what it is ?).
I attach the screens of the blueprints, hope you can help me!
That is the Drop Down you use to select the BP.
You only need to plug in if you have already referenced it and set it to a variable.
So just use the Drop Down to select the other BP
What are you checking that is valid? If it is in the other BP then Valid would go after the cast.
yeah I finally got it working. Basically I was doing it reversed: I got it working storing the variable in the character’s blueprint and then casting it from the actor blueprint. Thanks anyway because you forced me to rethink about what I was doing!
Daniele