Casting to the Actor Blueprint

you need a reference to the door that your trying to affect. you could do this by using traces, overlaps, public variables, or another method, it really depends on your situation. give some more info on your use case and i can give you a more specific answer.

Hello…So I have this Actor “Door” and I’m trying to access it from another blueprint and I’m using Casting,but When I use Cast to Door,I can’t find any proper object for it,so the cast always fails.Any suggestions what should I do?I know what objects I should use,when I’m working with Game instances,Game modes or ThirdpersonCaracter,but this is just an actor that has no parent.help?

can you make a screenshot of the problem?

Okey,I have the actor Door and I have the Animation Blueprint of the main character in which I have state “Opening Door”.So I need something to connect to “Can Enter Transmision” for this to work.
In the Door Blueprint I have this variable “CanET” which is supposed to connect to the Can Enter Transmition,that’s why I need to access the Door Actor so I can get “CanET” variable and connect to Can Enter Transmition.

I’m trying to reach the “CanEnterTransmition” Variable which is in the Door BP from the Animation Blueprint,that’s why I’m casting to the Door

You can refference the door in the Level blueprint (just drag and drop the actor from the editor to the blueprint)and from there send it as a variable to Game instances,Game modes or ThirdpersonCaracter. In Game instances,Game modes or ThirdpersonCaracter don’t forget to check if the value is valid.

Like this

That would work only if I had just one door,but there are more than one door,can’t reference them all

also you can set the DoorRef type as a Door object reference - that way you won’t need to cast anything - UE4 won’t permit you to connect it to “Set DoorRef” if it’s not a door

you need reference to it only if you get close to it?

If so you can use tracing. It traces in front of character to check if there is a door. Though you should tweak the values to fit your character and level design. Making a separate trace channel for it is also an option

my small mistake - the Casted Door should connect to Door Ref, not the hit actor

i probably would have used a overlap event in this case like what you have but then just set a variable in the character or someplace that is easy to access in the anim bp. ill post some pictures below to show what i mean.