Character Reference is not compatible with My Character Reference
I'm having problemas while trying to create a "Pause" menu. I've created a widget with the "Pause" screen, connected that with MyCharacter, promoting the widget to 2 diferent variables: "ReferenceHUD" and "ReferencePAUASA" as shown in the image below.
Now in MyController I'm trying to connect a GET MyCharacter variable to those two other variables (Reference HUD and ReferencePAUSA") as to control them from the controller, but I get the message: "Character Reference is not compatible with My Character Reference", as shown below:
By the way, the ReferenceHUD and ReferencePAUSA nodes only appear if I have the context sensitive option disabled...
Am I missing something? Thanks in advance!
the issue your having is that the MyCharacter variable is of type character which does not inherit from the MYCharacter Class (poor naming BTW). so basically your trying to get some variables from a class that doesnt have those variables. its a pretty easy fix though so dont worry. if your MyCharacter variable will always be a reference to a character of the class MyCharacter then just change the variable type to MyCharacter actor reference then you should be good. another way to do basically the same thing would be to cast to the mycharacter class to identify the variables value further. to make a analogy think of it like this your dealing with cars and your trying to get the badge of a mustang but you arent providing a mustang you are just providing car, it could be a jeep, a renault, a model t, or it could just be something that is car like, all you can tell about it is its got four wheels and a engine. hmmm its like your giving a blank which could be any character but hast been given the features yet, but your still trying to get hair color. i hope that makes some sense if not look into inheritance.
so simple answer change your variable type to the right class in the details panel and name your variables as to be more clear (MyCharacter could be MyCharacterReference).
answered Dec 02 '18 at 04:58 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here