edited July 2018 in General Discussion
Hi,

I've seen discussions similar to this on here before, but they didn't break a lot of things down that I needed, so I was hoping someone could take a minute and explain how to make an NPC walk from scratch.

Basically, I've created an NPC in blender and have two animations for him set up: Idle and Walk. All I really need him to do is walk around town (i'm sort of building trial game before I start the actual thing) and have some dialogue. What i'm struggling with, is where i put the two animations at in ORK (as the program is kind of all over the place) and can it be done strictly in ORK or do i need to use the NAVMESH as well? If anyone could help me with this it would be greatly appreciated. I just need an extreme laymen explanation.
Post edited by collbanth on
  • There are different ways to achieve this - if you want to do this only using ORK, you'll have to set up your NPCs to be combatants and use the move AI:
    - the NPC's combatant should be an ally of the player (and potentially also of all other factions), so setting up an NPC faction that's friendly with every other faction might be a good idea
    - use an Add Combatant component to add the combatant to your NPC game object in the scene
    - if you want to use waypoints for the NPC to follow, you can add them in the Add Combatant component
    - make sure the used combatant is set up to use a move AI

    As for the animations, they'd be set up in the animation settings the combatant uses, similar to how it was explained in the game tutorial series. Since you only have idle and walk animations, you only need to set up those :)

    The move AI doesn't actually move the game object around, it just tells the used movement component (e.g. a NavMesh agent) where to go. ORK's built-in default movement component is pretty dumb and just moves the game object toward the position, so I'd recommend setting up NavMesh in your scenes and using agents for movement.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thanks for the break down on this! Using the the past tutorials, I got the NPC to follow the way point, but he was sideways and didn’t use any animations. So I will try this and see
  • I think my issue maybe stemming from not setting the animations up correctly. I've looked over the egg models and their prefabs and tried to copy how they were set up for my own model, but still cannot get the animation when I press play. I can get the prefab to move to way point I set up. But he slides side ways towards it rather than front ways.

    I'm probably going to try using Mecanim as I'm not having much luck. If you can think of anything I'm missing let me know. I can show screen shots if needed.
  • In case you're using auto animations, try enabling Use Position Change in the combatant's movement settings.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited August 2018
    I've been trying to use NavMesh and ran into the same problems.
    After I enabled "Use Position Change", the walking and running animations started playing. But my "move into direction" event nodes stopped working after I set up NavMesh agents.
    Can I fix them somehow?

    UPD:
    Ok, I think I figured it out. You should not use "controller move" in "move into direction" event. Then it will work.
    Post edited by Arc_anzu on
  • @Arc_anzu hey thanks for the heads up. I haven't been on in quite a while, due to moving.
Sign In or Register to comment.