trying to convert functions to c++ how do I change target to scene component



I have no idea how to change the target of M set visibility and M setworldlocation to scene component like the normal blueprint function does how do I fix this? the stuff that starts with an M are converted to c++

1 Like

Hi there.

Firstly, Iā€™d like to direct you to the Unreal coding standards: Coding Standard | Unreal Engine Documentation

These are in place to keep a consistent standard and, crucially relevant to us, make it easier for people to answer questions and help you with your code.

Secondly, you should really be posting code with three backticks ` at the top and bottom.

Finally, your problem.

Target refers to the object you are calling the function on.
In this case, m_set_visibility is a public function of UGrappleComponent, therefore it can only be called on objects that are of type (or are derived from) UGrappleComponent.

I assume you want to call SetVisibility on GrappleHookCable, so you will need to click and drag from the blue pin on GrappleHookCable in order to call the SetVisibility function on that object.