Announcement

Collapse
No announcement yet.

Creating an NPC

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

    Creating an NPC

    Hey there,
    i am starting to dig down into NPCs and AI with behavior trees etc.
    In many tutorials people use a copy of their already animated player character as the enemy.

    What if i want to use a totally different character as NPC?
    Would i basically have to set it up as a playable character first, with state machine, anim montages and action button inputs?

    What is your routine in setting up enemy characters?

    #2
    Are you just concerned about the look? The player character or mannequin is rigged to the epic skeleton any other model that is rigged in the same way you can copy across the animations and use that model.

    Comment


      #3
      Okay so I understand that you can replace meshes that rely on the same skeleton and animations. But i opt for enemy characters that are totally different from the player character. Let‘s say my player is human, the enemy is a dog.
      I guess I have to set the dog up like my player character first, right?
      How else should the AI know which animation to play when the dog is walking, jumping etc.?

      Comment


        #4
        Yes your going to need to set it up. Often the standard animations will come with a the model. Their is a section called blendspace I believe which will allow you to map the standard walling animations to the model. After that attacks and so on need to be done individually.

        Comment


          #5
          Click image for larger version

Name:	capt.JPG
Views:	1
Size:	134.6 KB
ID:	1663627

          Inheritance is the key to not having to duplicate any code even among very different Npcs, The higher the events are more generic, the lower the events are more specialized.

          Comment


            #6
            Originally posted by DomusLudus View Post
            Click image for larger version

Name:	capt.JPG
Views:	1
Size:	134.6 KB
ID:	1663627

            Inheritance is the key to not having to duplicate any code even among very different Npcs, The higher the events are more generic, the lower the events are more specialized.
            Very interesting, this should become useful when i progress

            My core question persists: Should I preferably set up Animation BPs for my enemys, with state machines for the blending of walk/run, jump, attack
            OR should this all be done by playing montages by events?

            Comment


              #7
              You can create a "normal" animbp(sm, events, montajes) and each npc with different animations use this:

              https://docs.unrealengine.com/en-US/...ide/index.html



              Another useful thing that I use are the Sub Anim Instances, so you don't have to have giant animbp that cover every special case of the npcs:

              https://docs.unrealengine.com/en-US/...nce/index.html



              Click image for larger version

Name:	anibp.JPG
Views:	1
Size:	91.0 KB
ID:	1663822
              Last edited by DomusLudus; 09-12-2019, 02:51 AM.

              Comment


                #8
                Thank you very much, I appreciate the effort you put into your posts
                Cheers

                Comment

                Working...
                X