fael097
(fael097)
November 13, 2023, 5:09am
1
I’m using the “Set by-ref var” node to set the value of a variable, and selecting which variable I’m setting from a boolean select node:
Since I’m using that selection many times in my graph, I decided to turn it into a pure function:
but now, for some reason it doesn’t work anymore, it won’t set the value for the selected variable.
any ideas why?
SteveRambo
(SteveRambo)
November 13, 2023, 7:14am
3
You can try removing the select and making it a branch instead, then return the variables accordingly (which won’t be by ref). I believe your current implementation is losing scope once it returns.
1 Like
Auran131
(Auran13)
November 13, 2023, 8:19am
4
for whatever reason functions cant return a ref, at least in blueprint, you can use a macro though
fael097
(fael097)
November 15, 2023, 3:19am
5
It has to be by ref, since I’m choosing which variable to set, and not the value.
Regardless, doing it via branch doesn’t work with by-ref either
fael097
(fael097)
November 15, 2023, 3:20am
6
Welp, macro works indeed. Thanks!
1 Like
system
(system)
Closed
December 15, 2023, 3:20am
7
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.