Why won't it Cast?

I’m getting really frustrated. Why does this keep screaming at me!?

The code should work if i can reference the object ‘box test’ inside of BP_Test2.

I’m trying to attach a morph target which is on Actor ‘Box Test’ to a slider on the widget blueprint. I hope that makes sense.

What do I have to reference and why?

You need a variable in your morph slider widget pointing to the BP_test BP, otherwise you can’t access it.

I notice you spawn a morph slider widget in the other BP, but that’s not THE morph slider widget you have in the other window, it’s A morph slider widget.

I think maybe you’re getting confused between the class of object ( ie a BP_test2 ) and the actual instance of the BP_test2 ( an actual occurrence of it ).

You can’t talk to a class, you have to talk to an actual instance of the class ( a real thing ), and to do that, you need a variable pointing at it…

So, on you tick you could say:

and plug that into your set morph value ( although getting all actors on tick is a bad idea, this is just to get the point across ).

Thanks you so much.Yes, I’m not very good at this to be honest and my naming conventions don’t help the matter.

No worries, absolutely everyone has this problem with object programming to start with. I recall people trying to explain to me until they were blue in the face :slight_smile: