I searched already for solution, but no luck.
Here is what I have so far and my problem. Please correct me if Im doing anything wrong. Im new to this.
I have a mutator. It modifies the pawn by adding an inventory. This inventory will always be with the pawn until it dies (just like the sheild gun).
The inventory adds an interaction that is attached to the player controller. And the interation is used to get input.
Here is the problem:
Once the pawn dies and respawns, I get General Fault error saying something wrong with the InteractionMaster. I do have stuff in the Tick function of the inventory to call a cleanup that will remove the interaction if the pawn dies. But those logs never show up, so its not being called.
So the problem now is how to clean up the interaction? (note that a new interaction and inventory are spawned once the player respawns).
Also, am I doing this right? Would it make more sense (and more efficient) if I have the interaction spawned only once in the Mutator class and then not have to worry about removing it? My main problem lies in that fact that I cant seem to able to clean up once the pawn dies.
Here is what I have so far and my problem. Please correct me if Im doing anything wrong. Im new to this.
I have a mutator. It modifies the pawn by adding an inventory. This inventory will always be with the pawn until it dies (just like the sheild gun).
The inventory adds an interaction that is attached to the player controller. And the interation is used to get input.
Here is the problem:
Once the pawn dies and respawns, I get General Fault error saying something wrong with the InteractionMaster. I do have stuff in the Tick function of the inventory to call a cleanup that will remove the interaction if the pawn dies. But those logs never show up, so its not being called.
So the problem now is how to clean up the interaction? (note that a new interaction and inventory are spawned once the player respawns).
Also, am I doing this right? Would it make more sense (and more efficient) if I have the interaction spawned only once in the Mutator class and then not have to worry about removing it? My main problem lies in that fact that I cant seem to able to clean up once the pawn dies.
Comment