Setting a variable doesn't work
So I made a function which sets an Integer in another blueprint (a userWidget blueprint class) and it just retains it's default value. I tried it all: I first printed the variable to make sure that it was calculating the correct number and it did, after that I checked my variable to the widget blueprint with isValid which it was and I am pretty sure it is not a replicated variable (since I have to give the function a target for the blueprint) but it is still not working. I'm not really a beginner anymore so I don't know where my mistake is, maybe I made a stupid mistake or something else but any hint is appreciated!
asked Nov 23 '17 at 09:52 AM in Blueprint Scripting
Any further progress on this problem? I've met almost the same set variable problem and yet have no solution.
answered Jan 15 '18 at 07:56 AM
To answer wzspdw and maybe Rising-Mobile aswell if you never found the answer :)
In the first image you drag a reference of the Slot Cast Ref, this blue line continues on over to the second image where you do Get Class, and then Get Class Defaults. Based on the name I hope you can see for yourself why this does not work and will in fact, do as you said, set the default value. Instead do this, Drag a reference of the Slot Cast Ref, type Get User Widget Object, from this node do a cast to your widget class (cant really see in the picture but I think it says W Inv Slot something). From this cast, drag of a reference from the object and from there you should be able to set the integer.
Hope that helped, I can provide images tomorrow if that helps. Cheers!
Follow this question
Once you sign in you will be able to subscribe for any updates here