Announcement

Collapse
No announcement yet.

Spawning character via blueprint

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

    Spawning character via blueprint

    Hi guys,

    Just wondering if anyone can help me sort out a problem when I spawn a new character.

    By pressing 2 I have the character change from hands to weapon, however when the weapon character spawns it appears to be in mid air.

    Here's my blueprint and a video of whats happening.

    Thanks!

    https://www.youtube.com/watch?v=73dAfVFhTvw

    Click image for larger version

Name:	spawn character.jpg
Views:	1
Size:	94.4 KB
ID:	1191762

    #2
    Maybe cause you spawn your weapon on the camera and not in a socket from your character ?

    Comment


      #3
      I tried setting it to the character mesh but that made it spawn facing left and in a slightly different location. :/

      Comment


        #4
        You have to fix that on your character editor. You can apply a preview with your weapon on the socket you want. Then you can put the good location for your gun.

        Here a tutorial for that :

        Comment


          #5
          The gun is already attached to the socket. I'm not spawning just the gun its a full character blueprint, so different arm mesh, animations, blueprints, camera etc.

          Ideally it would be great if I could switch between default pawn classes in the game modes via blueprint. So pressing a key in gameplay would completely swap the default character BP. Would love to see if that could be done as I can't find anything onine!

          Thanks for continuing to help BTW

          Comment


            #6
            Interesting method. Right now even if the was working your not destroying the previous blue print. So when you press the button multiple times you'd end up with a bunch of the blueprints spawned but sitting idle.

            Just theory here but if you did this you'd need to set life for current blueprint on key press to like .2 and the spawn and possess the actor

            not sure this is the way to go about this
            Inphidel / Brian - Developer of Ultraball
            http://www.ultraballgame.com

            Don't shy away from bugs in your game. Don't play it as intended. Break your game so you can fix it!

            Comment


              #7
              Very strange that theres no information regarding switching default pawn classes in the game mode via blueprint. People have asked similar questions on here and it's never really been solved.

              Comment


                #8
                You can override default pawnclass but you then need to essentially respawn.

                I'm doing that in my came to do teams.

                It's located in game mode.

                I use an enum which I set in my playerstate then respawn character and have the override choose defaultplayerpawn based on that enum.
                Inphidel / Brian - Developer of Ultraball
                http://www.ultraballgame.com

                Don't shy away from bugs in your game. Don't play it as intended. Break your game so you can fix it!

                Comment


                  #9
                  I don't quite follow, sorry. Would you be able to post a screen shot?

                  Thanks for your help!

                  Comment

                  Working...
                  X