BP_Protagonist is the player character.
GetPlayerCharacter can be a nullptr at times - multiplayer servers is one example.
Does it consistently fail - or does it work most of the time?
I changed the reference type to a BP_protagonist, however now i fear if i make a multiplayer it wont work
you can check it with a âIsValidâ and reset if it failsâŚ
what do you mean by âresetâ? whenever i loop it back to the cast when itâs not valid, it just says the same thing
If youâre worried about a reference getting invalided due to multiplayer, test it with the IsValid and set the reference back to âGetPlayerCharacterâ if it isnâtâŚ
holy â â â â i just realised i dont need to do any of this stuff and i could just use get player character. im so â â â â â â â stupid
Yeah itâs not slow
ik im setting it to a reference