Announcement

Collapse
No announcement yet.

Beginner question: adding an item to a socket blueprint

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Beginner question: adding an item to a socket blueprint

    Hi all,
    I have an interaction system based on a parent object that detects when you're close enough to pick up an item. I then make a child object for various interactable objects - guns, ammo, doors, etc - and have different functions for them.
    My problem is quite a beginner one, but I suppose we all have to start somewhere. I want to attach an item to a socket when its interacted with, so for example, my character picks up a flashlight and it's in their hands. However, all the tutorials I have found are out of date and using functions that no longer exist in UE 4.15.
    I know you create a socket on the player skeleton and position the item in place.
    It's the blueprint that I'm having problems with.
    So far all I've managed to do is make my character attach to the item - and then freeze in place - or turn very small and run around horizontally for some reason. Which is very funny, but not what I need.
    Can anyone help me with the process for the blueprint please?
    Thanks in advance!

    #2
    https://forums.unrealengine.com/show...-to-actor-help!

    Comment


      #3
      if the object you are attaching is a static mesh and has collision, youre prolly going to have to disable that collision when you attach it, that's what I bet is making it run derpy, your player his hitting that collison
      Come Join Me On Patreon : https://www.patreon.com/iamjohngalt75 Or Visit Me On Youtube : https://www.youtube.com/channel/UCpu...wyusqni1ZnWdBQ

      Comment


        #4
        That was one of the things I needed to fix, thanks for your advice

        Comment


          #5
          Thank you for the link to the topic. I followed the process there and although it worked for me using a bog-standard cube and a new project, I still had no luck with getting it working using my current interaction system. I'm not sure if it's a problem with the system itself; I was following a tutorial and didn't realize they stopped before teaching you how to pick up objects with the system. I'm guessing it could be a problem with how I'm implementing the static mesh too? I'm turning off collision, so if that's the case I'm stumped. I've included an image of the components I have with the interact system if that's any help.
          Attached Files

          Comment


            #6
            Post a pic of the blueprints where you did the attachment code.

            Comment


              #7
              Hi,
              I managed to get the interaction to work with a blueprint (see attached) and an OnComponentBeginOverlap, but ideally I want it to work with an action event (press a button, item equips). At least for now anyway - I plan to add inventories later. It's now just getting that command to work that's troubling me.
              Attached Files

              Comment


                #8
                enable input on the actor to interact with.........example, player enters the actors overlap, enable input on actor, add a button to do something, then add logic for what to do when that button is pressed. aka attach it to your players socket.......

                All that can be contained in the actor youre interacting with......
                Come Join Me On Patreon : https://www.patreon.com/iamjohngalt75 Or Visit Me On Youtube : https://www.youtube.com/channel/UCpu...wyusqni1ZnWdBQ

                Comment


                  #9
                  Thank you, as soon as I get a chance I'll give it a try

                  Comment


                    #10
                    Hi,
                    I decided to go back to a previous method of item interaction I couldn't get to work, but I managed to get it working and it's more effective for me than the last one. Thanks for the reply and advice

                    Comment

                    Working...
                    X