So I decided it would probably be smart to wrap the opening and closing of all UI elements within one function so I don’t have to copy and paste the whole node logic to each menu. I’m taking in a boolean that tells if the said menu is open already or not. But I can’t find a node to set that variable with, when I have opened the menu. Normally I’d just drag and drop the variable and set it, but you can’t seem to do that with the input. How would one set a boolean input inside a function?
you created a function (I dont know why you pass the boolean by ref…are you planning to change the value of the original variable?)
then you just drag and drop the function elsewhere like this:
The bool you made is just an input. And the value of that is just transient, only existing while the function is executing. You can make another boolean variable for the whole BP that will persistently hold that value, which you can set whenever you want in or out of that function.
Maybe OP is just looking to set the Boolean (ref) parameter from within the function. If it is the case, it can be done with the “Set By Ref Var” node:
Yes, that would be it. In hindsight, kind of silly of me to never try and search for “set var”. Thanks a lot!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.