The condition in your branch is set to always be false so your attack will always miss (or to be more specific it will end without printing “missed” 50% of the time in the CompareInt or reach the always false branch the other 50%). If what you want is a 50/50 chance of hitting you could remove the branch, connect the “>” on your CompareInt to Set Current Health and the “==” to the Print String. From how I understand your blueprint this should work.
Edit: After I got home I threw together another way of doing this. The nodes below are inserted into the Attack Unit part of Unit_Parent’s event graph since I feel it makes more sense to calculate miss chance as part of the attack instead of when receiving damage. Here I have added two new public floats to Unit_Parent called Accuracy and Dodge. To hit chance is calculated by subtracting the dodge of the target from the accuracy of the attacker. An attacker with an accuracy of 0.9 attacking a target with a dodge of 0.3 would have 0.9 - 0.3 = 60% change to hit. Hope you find this solution satisfactory. If not I think it is a good starting point for many other ways of calculating hit chance.
I am trying to replicate this and have got mostly everything apart from the two floats setup, is there any chance you can go through this step by step? or possibly let me know where I am going wrong?
Below is what I’ve got so far.