I am trying to get the player character in blueprint in my playerstate. I can get it in c++ with out problems but the cast in blueprint always fails.
Here’s the c++ thing I am trying to accomplish in blueprint in my playerstate class
AController* OwnerController = Cast<AController>(GetOwner());
if(OwnerController != NULL)
{
AFirstPersonCharacter* OwnerCharacter = Cast<AFirstPersonCharacter>(OwnerController->GetCharacter());
if (OwnerCharacter != NULL)
{
OwnerCharacter->testfunction();
}
}
Here’s the Blueprint function
I am fairly sure I am looking at this wrong but I’ve been at this for many hours over quite a few days and could just have tunnel vision.
thanks MK