Trouble Understanding Casting

Casting is like creating a door to another blueprint so 2 blueprints can talk to each other and send information back and forth. But in order for it to work you need to specify which blueprints are going to talk to each other. That’s what the object pin is for, that’s like a key to open the door. There are many different types of doors each has a key or keys that will be accepted and allow the door to open and information to pass through. So in your case you need a “reference” which is basically a specific copy of “stack spawner” to plug into the object pin this way the computer knows exactly which stack spawner is getting the Boolean value changed. You could have 2 spawners in the level or more so it needs to know which spawner specifically you are changing the Boolean variable in. How you get that specific reference can be done many ways with overlap events, hit events, the level BP can create references directly just by clicking on the actor in the viewport etc but that is the basic idea of casting. Hope that helps clarify some things for you. I also have an entire UE4 beginner series that starts by explaining casting which may be of help to others who stumble upon this issue.

Hey, so I’m pretty new to UE4, but I’m learning fast. I’ve been trying to figure out how to cast a boolean to a blueprint class and just don’t understand exactly how to do that. I’ve read documentation and watched videos, but I’m still lost.

I read this btw: https://docs.unrealengine.com/en-us/Engine/Blueprints/UserGuide/CastNodes

What am I supposed to connect to the object node? I’m attempting to cue a custom event I made from a different blueprint class’s event graph. Thanks so much in advance to anyone willing to help.
Here’s my attempt.

I’m sorry, I posted the wrong image. This is what I meant to upload. I was going to do it differently earlier, but I changed it to be event based. Still, can’t figure out casting.

I dont really agree with the door analogy here. In my opinion a cast is just a comparison. Is the object being input aimilar to the class being casted to. Course thats just hiw i see thigs and can kinda understand your view on it as well.

Overall though i agree with your point there. A reference is definately needed and there many different ways to get one. One method i use is to make a editable variable and ise that as the reference so i can just select the bp actor in ghe scene and set the variable in the details panel

Haha, was just trying to blend how casting is used and what it actually is into one analogy. I am not from a computer or programming background myself but I understand logic and when I was learning you could tell me what a reference is, define casting in technical terms and I would be ok. But I also understand not everyone is that technically oriented so I didn’t want to explain it in a way that I know would make sense to the programming community but possibly just cause more confusion for the poster. So I made a door analogy, I know it isn’t the most technical or accurate representation but I figured it would get the job done.

I totally understand im not really a programmng background either. The best analogy ican think of off the top of my head would be the childs toy with the different shaped holes and pegs but even that isnt quite right