UE4 Blueprint Cast failing without reason - casting

I am having a problem with casting in Unreal Blueprints. I am trying to cast from a widget blueprint to my game state to get the number of players remaining in a game to show on the HUD. I found out that the cast to MyGameState was failing, but I had casted to it the exact same way from multiple other blueprints with success, so I had no idea what the problem was. I was wondering if anyone could help me with this, and if so, I really appreciate it. Here is my blueprint:
Note: I know that this question has been asked before but I have not been able to find an answer that has worked for me. I would really appretiate not marking this question a duplicate unless an answer to another question actually works to solve my problem. Thank you for the help!

Create a variable for gameState object and set it in your event construct of your widget event graph , use the variable here in your shown code using if valid node .

Related

Unreal c++ AddControllerYawInput() function working

Can someone explain the AddControllerYawInput() function to me, What it does and How it is supposed to move the camera. Here is the link to the function on unreal docs. It doesn't explain the function that much and i am unable to find a satisfactory explanation too.
I am actually trying to move the camera attached to a pawn that i am controlling. According to unreal HERE on this page, "AddControllerYawInput" should move my camera attached to my pawn (or i'm as usual mistaking it) but the camera doesn't move. I'm not completely noob at unreal. Anyone answering this question please first explain this function before telling me how to move that camera.(I can do this with other methods, i just want to know why the method on unreal docs isn't working and i also want to know about the function.)
Thank You.

unknown class name 'MyCentralGraphicsItem'; did you mean 'MyCentralRectItem'?

I have a bug that I have been trying to fix for hours, it is not a big deal but I really don't know what to do here. I am using Qt, but there is no need to know Qt, just C++ and OOP.
This is the repository in which I am pushing all the project. Don't worry about all the files, the ones that I am having problem with are MyCentralGraphicsItem and MyCentralRectItem. QAbstractGraphicsShapeItem is an abstract class provided by Qt. I inherited from it to create my custom Items.
You can find the output error in the bug file in the repository.
Thank you for your help!

Image (Numbers/Letters) recognition

I'm learning C++ for half a year now (so programming in general) and this site always had the answers I was looking for. But now I came to the point where I need to ask as I couldn't find anything related to my question.
So I want to write a program that takes a screenshot of a particular area of the screen. This screenshot will ONLY contain playcards (so for example Hearth, Seven). What it should do now is return me which card it is, so the symbol and the number/letter.
I already made some researches and the most mentioned thing was the library "OpenCV".
So my question now: First is it even possible with my experience to write something like that?
If so, is this library the way to go? It seems really strong, maybe too strong for just the recognition of numbers/letters and four symbols? So could there be something easier?
And the last question, how could I get a screenshot of a particular area of the screen and not the whole screen and save it somewhere?
I hope you guys have a clue what I really want to know and it was understandable.
Greetings
Definitely use OpenCV. It is not too hard to get into, and once you do you will find it does basically everything you'd want. It makes image processing relatively straightforward and it can solve your problem in a lot of ways.
Here is a good place to start.

MFC C++ custom control for round gauge

I'm hoping here but does anyone have code for a round gauge (like the speedometer in your car) for MFC?
Maybe something exists already but I don't know about it.
I saw an interesting article about making my own customs controls here http://www.codeproject.com/Articles/521/Creating-Custom-Controls but don't want to spend all day on this, i'm hoping for an easy way out
thanks
There is an article about a CStatic derivative CSpeedoMeter class on codeproject. Please also have a look at the comments on the article, because some changes to the code might need to be applied in order to fix a resource leak.

MFC Container based application

I have a Doc-View architecture based project completely ready. But now i want to convert it in container based application to provide OLE support to existing project.
if anyone know how to convert, please reply as soon as possible. i just need a way without copy paste of existing code to new container based application- i tried - not worked even after settings change.
There is a good worked example of this here. Basically all your CDocument derived classes must be now be derived from COLEDocument, and you need some extra code in your WinApp.InitInstance.
If you post the code that you tried, you may get a more detailed response as to what is going wrong.