When casting to an actor, it always fails because of the wrong input.
So, since the answerhub decided to remove all the work I put into writing this up once, I'll keep it short. This is what I have:
I'm trying to cast to the Hook (A normal actor BP) from the Level Blueprint.
But the Input for "Object" doesn't accept anything. I've tried many many many different nodes and none of them cause the Cast to succeed. The only one that I have found that doesnt cause an outright error is the "Get owner" Node, but even that causes the cast to fail. Like so:
So I beg you all, which node exactly is it asking for? I have done SO much research on this and read all the 'theory' behind casting, but for over 2 months now I have yet to figure this out. Please help, If this isn't the right way to go about getting information (such as variables) from an Actor, please let me know how else I can do it. This has been a huge annoyance to me lately and I just cant get it right.
TL;DR, What node do I input for an actor BP under "Object"?
asked Nov 20 '15 at 10:45 AM in Blueprint Scripting
The cast node wants an instance of an object, not the blueprint (which is like a template used to create instances). If you want to use the level blueprint to cast an actor contained in the map, follow these steps
There are other ways to find instances of objects, Like the GetAllActorsOfClass node. It allows you to specify an actor type (this is where you'd enter the Hook blueprint) and will return an array filled with every instance of that class that currently exists.
Hope this helps you.
answered Nov 20 '15 at 01:31 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here