The error means you don’t have the “BP_Waypoint” blueprint component inside your player controller. Is your “BP_Waypoint” a component or an actor placed in the world? If it’s an actor then utilize the use of the “get all actors of class” node.
This multimillion dollar engine is telling you that you have a bug in your program.
You’re getting an object that is of class BP_Waypoint, and you’re trying to cast it to PlayerController. That won’t ever work. Trying to do that is a bug in your program, and it’s helpfully telling you as much.
I don’t know what you mean. I’ve trying to cast from blueprint to blueprint. It’s not working. I’m not trying to control the player. Player just has a camera that they look through.
That just counts how many blueprints there are in a scene. I don’t need that. I’d need this blueprint 1 to find blueprint 2 and update a value within it at runtime.
Blueprints are not objects. Blueprints are classes.
Actors are objects.
Blueprints contain the template values for objects created from them, but you cannot change a Blueprint at runtime.
You can find an object (actor) and update a property on that object (actor.)
Exactly how you do that, is part of what game development is all about, and depends on how you structure your game.
Also, you say that you’re not trying to control the player, but that’s exactly what your code is trying to do here:
It gets an object which is of class player controller. It then tries to reinterpret that object as if it were a waypoint. Player controllers are never waypoints, and therefore that reinterpretation (cast) will never succeed.
Aah so blueprints aren’t all the same. I thought I picked the first actor blueprint from the selection when you create a BP.
So in a sense I need some prop and attack a blueprint to it? I am basically trying to tell a ball to move to the vector 3 position. Ball isn’t the player and there should be multiple balls, so BP isn’t unique in the scene. This vector 3 position I should be able to update at any time. Right now it’s changed where ever the mouse moves to. Is that not an appropriate use for a blueprint?
Blueprints are like templates, or stencils, or plans for building something.
Once you’re running in the game, you’re no longer the “plan,” you’re the “actual thing,” which is called an Actor.
The Actor “knows” which kind of “plan” was made to build it; that’s the actors “class” – but the Actor is some kind of Actor, it’s not a Blueprint.
If you are not familiar with classes and objects in general, this may take a while to fully understand. You might want to try reading some resources online related to the difference between “objects” versus “classes” (this comes up in many different programming languages,) or maybe read up in more detail on the blueprint documentation page: