[Error] This blueprint(self) is not a ThirdPersonGameMode_C
I have the error that i dont know how to fix. Can you help me? On the first picture ThirdPersonCharacter. On the second ThirdPersonGameMode. The warning i know how to fix.
asked Aug 28 '18 at 06:43 AM in Blueprint Scripting
I'm casting self (Character) to a player controller which is totally different, to fix the warning needs GetPlayerController > Cast to >> MyPlayerController. To fix the error needs Get Game Mode > Cast to ThirdPersonGameMode > the result of the cast is the target in your event with the error. Thanks, SenToRious.
answered Aug 29 '18 at 08:06 AM
You're not connecting the correct things to your function.
Use the GetGamemode Node for the top pin.
Use the GetController Node for the middle pin.
Use the Self Node for the bottom pin.
answered Aug 28 '18 at 08:35 AM
One error is because you are trying to cast a character to a controller. Casting only works on things that have the same class inheritance. So for example you can cast Animal to Dog, and Dog to Golden Retriever, and Animal to Golden Retriever, but you cannot cast Kitchen Appliance to any of the above.
If you want the controller of the Character then use the character's Get Controller node.
answered Dec 06 '18 at 04:10 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here