Can someone tell me where do I find the “set”? What is it called?
Typically, you call it on some object, and it’s a setter property of some variable on that object.
Seeing one without the implicit “self” is kinda weird, but I’d expect that’s what’s going on – there’s a variable called “HitInfoL” on the object containing this graph.
Right click the pin and Promote to automatically create a variable of the correct type and Set its value to what the tracing (?) node returns:
You can then rename it, ofc.
the behavior of the default Set()
is defined in the engines C++. by default it directly assigns the value for integral data types (int, float, byte, bool…) in place, while for complex data types (Actor, Transform, Rotator) it will attempt to perform an in place overwriting of the values, or replace the pointer to it with the new one, if the variable is a pointer (the blueprint term “reference” is slightly ambiguous on the C++ side), but at the worst will invoke the copy constructor to do the assignment.
to gain access to a given Set()
node for an existing member variable you can right-click on empty part of the grid and type the member name, and one of the options should be “Set [Variable Name]
” or in the Variables list drag the member out onto the graph and then select “Set [Variable Name]
”
- if this member variable is defined in C++ it might have the Set node disallowed which means you are intended to “set” the value through some other means.
if this is not an existing member variable (it was returned from a function or was passed in at the start of an event/function) then you will need to promote it to be a member Variable with right-click (on the pin) and select “Promote to Variable” .
This is very informative! Thank you.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.