How to target the object BP your character is "holding"

anonymous_user_184504de
Wed, 23 Mar 2016 18:14:15 +0000
Character & Animation

Hello! I’m working on a third person project where I want my character to be able to pick up an object, let’s say puzzlepiece for simplicity, and attach it to sockets on a wall. The puzzlepieces are all duplicates of eachother, and will spawn when killing an enemy in game. Then, for the placing event, I want to add them to the sockets in a specific order (first to socket 1, then 2, then 3 etc). But I only want you to be able to place the puzzlepiece your character has attached to their hand socket (the piece your “holding”). Currently, I have a line traces set up so that I can attach any of the duplicate pieces to my character, and for the placing event, I have a boolean check after the line trace so that you can only attach a puzzlepiece if your character “is holding” one. But the problem is that when I trigger the placing event, it only attaches one of the pieces (the “original” piece, i.e. not a duplicate). I’m really new to all forms of programming and have a hard time figuring this biz out. Any advice is helpful!

Oh right, my blueprints for y’all:

The grab event, in the puzzlepieces’ BP

The line trace to trigger grab event in characters BP

The place (attach to wall) event in the walls BP

The line trace to trigger place event in characters BP

8 posts - 1 participant