Widget Blueprint, to target actor boolean variables

I have a variable that was created in a actor blueprint, I want to set the boolean variable to true when a event happens in the widget, but I dont know what I need to make the target for it to work, if I do cast to actor it wont work, any suggestions or answers?

Hi man
like you said “I have a variable that was created in a actor blueprint,”
so you need a reference to that actor.

for now, if you have only 1 actor of that type, you can use “get actor of class” and plug the output in the target of your variable

When I make the Reference from the actor to the widget it returns this error, but I am using get player controller, what am I doing wrong?

Hi man,

Basically , an object reference is like a box, that can contain almost any actor in unrea, staticmeshActor, pointlightActor, cameraActor and all your blueprint based on actors too.
instead a new blueprint you make like “TurrettBot” or “DrivableCar” are actor with a specific class, like a specific type of actor.

Usually you get a actor reference “that is a general”
with wich you can set the actor-location or rotation “that are generic value common to all actors”
almost any kind of variable “set and get” are about a specific class
so we use “cast to” a specific type of actor, to be able to set them.

  1. try connect directly the return of “get all actor” to the target of " set drag"
    or
  2. from get actor of class, click an drag the pin of “return value” and search for “set drag complete”, you should find it.

As your node error states, you need to connect Drag Drop Task Actor Object. The Boolean variable is not created by you, I assume.

Holy crap thank you :smiley: I was stumped on this and you are right on with the get actor from class, I was just getting the wrong actor. Also one more question, I made it so when I click on the keycard(the green thing on the ground,) it makes my character into the keycard, but the size and collision is off is there any way to fix this? The collision on the keycard itself is fine, but it is like the keycard is not ignoring the old characters collision, but when I do ignore collision in the players blueprint it just falls through the world, so I need a way to make my character inherit the collision from the keycard so I can turn off the collision in the player but not have it fall through the world.