Hi,

I have a quick question....

I have a camp site with one of the NPCs needing to walk to a spot. I have set up the start event so that Actor - Goblin changes position to the required spot. This works fine as it walks to it, however the walk animation doesn't play - it only has the idle animation.

I am not sure if this is because I am using the same prefab as a combatant. Would it be better to have 2 prefabs one for NPC use and 1 for battle use?

Thanks!!
  • You don't need two prefabs, you can definitely do it with one. Are you using mecanim or legacy animations to start with, and are those set up right? Does your prefab have a character controller on it (and are you using Controller Move) in the event?
    My little chunk of the internet: http://artemic.com
  • Unless the NPC is a combatant (e.g. spawned through a Combatant Spawner or by adding a Add Combatant component), the combatant's auto move animation wont be used (since it's just a game object without any relation to the combatant).

    So, either add a combatant to the game object, or just play the walk animation in the event :)
    Also, you can use other solutions (e.g. Makinom, schematic checking the game object's speed and playing the related animation) or custom scripts to implement your own animation logic.
    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!
Sign In or Register to comment.