Announcement

Collapse
No announcement yet.

detach weapon from socket

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

    detach weapon from socket

    Hi there!

    I created two sockets for the character - one for the weapon during non-battle action, another one for weapon during the battle.
    Click image for larger version

Name:	skeleton.PNG
Views:	1
Size:	22.1 KB
ID:	1208928
    In animation it looks like this
    Click image for larger version

Name:	animation_view.PNG
Views:	1
Size:	114.8 KB
ID:	1208930

    Also I added blueprint nodes that allows me to display the weapon on default and when I switch to battle stance
    Click image for larger version

Name:	character_blueprint.PNG
Views:	1
Size:	186.8 KB
ID:	1208929

    By default character has a weapon on his back.
    Click image for larger version

Name:	no_weapon_default.PNG
Views:	1
Size:	113.4 KB
ID:	1208931

    When I fire action to enter the battle mode it spawns weapon in another slot. However the weapon on the back left as is
    Click image for larger version

Name:	battle_mode.PNG
Views:	1
Size:	132.9 KB
ID:	1208932

    Also when I switch non-battle mode the weapon left in the hand of the character too.
    Click image for larger version

Name:	idle_mode.PNG
Views:	1
Size:	124.0 KB
ID:	1208933

    How to detach weapon from the socket? Or is there should be another approach for weapon switching?

    #2
    Instead of spawning a new weapon when entering battle mode just attach the existing weapon to your hand socket.
    When you switch back to non-battle you can attach it to the socket on the back again.

    Regards

    Comment


      #3
      What do you mean by attach? In Blueprint? How to do that? Like this?

      Click image for larger version

Name:	like_this.PNG
Views:	1
Size:	105.2 KB
ID:	1122585
      Last edited by Chucke1992; 02-04-2017, 06:22 PM.

      Comment


        #4
        Yes that should work.
        When you first spawn your "Sword Game BP" store the return value in a variable.
        Use that as Target for the attach function and it lets you move your sword between your sockets easily. I use it myself.

        Regards

        Comment


          #5
          Got it. Thanks!

          Comment

          Working...
          X