Casts not showing up in blueprint?

I’ve been using “cast to” to get/send information for one blueprint to another but now they are not showing up, even in the blueprints that still have these casts in them. Also blueprints don’t show the components I click on either. So if I select a trigger in the level it still says select a component.

I’m sure I’m missing something basic here, maybe you guys have an idea.

You have to pull it out something with case sensitive… :smiley:

I tried pulling it out of the same ones the other "cast to"s were connected to, still nothing. Maybe I didn’t have case sensitive on, I’ll double check.

Thanks.

Post a picture of your blueprint.

Are you sure you know what you are doing with “Cast To”? It doesn’t send/get information, it’s used to treat one object as another object( if it can be). Now after the object is being treated as another object that other object may have the variables that you want to get so you can do it that way. I just want to make sure you don’t think it’s “casting” information from one object to another.

I’m not sure what I’m missing. And no I’m not sure what I’m doing. :slight_smile:

137f17fcf08cf564e1568e0cf5d94f28a018babe.jpeg

Edit: When I pull out of the “Get Controller Pawn” I get the option to cast. Thanks guys.

You cant cast out of nothing, you need to get some sort of controller or whatever before you try finding the blueprint. Two easy ones that you can find nearly everywhere is “Get Hud” and Get “Game State” Because this tells the engine that its looking for that type of blueprint instead of everyone of say maybe up in the hundreds on bigger projects.

That makes sense, thanks fanzypantz.

You simply need to drag a wire from the get controlled pawn and it will allow you to do that cast.

What are you trying to do with the second “Cast to” after all those sets?

“Set Movement Speed” function at the end sets the movements speed based off the class.

It looks like you are building it a little more complicated than it needs to be. If you can only be a single class instead of having all those bool values create a Enum with those values in it and create a variable for it in your character. You also don’t need a single “cast to” and use it’s return for all of what you need.

I see, I’ll try that out. Thanks.

Making it into it’s own class worked out great DarkHorror. Now for another question…

I’m trying to spawn an actor, which is a trigger. Then add it to an array, so I can keep track of the spawned. Then destroy the actor under the cursor.

I’m spawning the actor just fine but I can’t see to get it to destroy. Any ideas?
753e36bdaa0f76dd1aa55b3f69c1283ac289993c.jpeg

First rather than getting all the actors and setting the array each time you spawn a new actor, you can just add the spawned actor to the array. Second after break hit result rather than checking contains, use Remove to attempt to remove that actor from the array. Then do the branch on it’s result. If it’s still not working, I would put a break point at the Remove node that you add, and watch puddle name array and the hit actor component. that way you make sure something isn’t setup incorrectly.

Thanks, I still can’t get it to work. How can I print the objects name? I don’t see a way to convert it to a string for “print”.

Just go to the blueprint debugger and add a break point, and watch those variables. You can look at it there