Connecting a playerstate to a character
I have a custom playerstate and gamemode class. How do i connect my custom playerstate to thirdpersoncharacter?
asked Apr 24 '15 at 07:24 PM in C++ Programming
A variable of APlayerState type is contained in every class that derives from APawn (including ACharacter). Thus, in your Character class, you can use the following (assuming your PlayerState class derives from APlayerState class):
Please note, that PlayerState field has APlayerState type, so in case you need to access some functionality which is implemented in your custom PlayerState class, you need to perform a cast to the type of your custom class.
Hope this helped!
answered Apr 29 '15 at 12:09 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here