Hello,
I want to set a variable (Actor) to my sword which I have attached to the characters hand.
This has to happen directly at the start.
I will explain it in more detail below.
This is my CharacterBP with the functions to pick up and drop my sword.
IsHolding is set to true by default because I start with a weapon in hand.
The sword I start with is defined as a child actor, the specific sword is defined in the child actor class.
The socket is set to the socket name that the sword will be connected to.
The problem is that the “Held item” variable (Actor) is only set in the pick-up-logic.
Since I start with a weapon in my hand, I have to drop it first.
But this doesn’t work, because the variable “Held item” is not set at this moment and I get an error. “Accessed none trying to read property Held item”.
How can I set this variable right at the start to my sword that I attached at the beginning?
Or is there another solution on how to do this?
Thanks in advance