edited March 2014 in ORK Support
I'm currently trying to make a real-time RPG with a Diablo/Torchlight-like style of combat. I've set up a combatant spawner that spawns 10 of an enemy combatant prefab. The enemy is a monster that looks like a wolf currently. I've added a damage zone to my player and put a damage dealer on the enemy's head.

Despite whatever ranges I've set up, when the enemy moves in to attack my player, it does so and then moves right into the player's collider and starts circling around the player. Because of this, the next time the enemy attacks, it's head goes right through the player and doesn't damage them at all.

Another issue is that the enemy's animation for movement isn't playing. I have set the correct animation setting on them and I have turned on the Auto Move option under Animation for the combatant, but they just stay in their idle animation while moving. I am using the legacy animation system.
  • Did you set up the Box Radius of your combatants?
    Also, do you have colliders on them (not used as triggers) that prevent the combatants from running into something?

    The movement animations not playing could have multiple reasons, e.g.:
    - wrong animation layer setup (e.g. idle animation is on a higher layer than the moving ones)
    - misspelled animation names (case-sensitive)
    - correct animations selected in the combatant's 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!
  • I didn't have a box radius set, but even after doing that, the enemy still comes up to the player and circles around them. The enemy has a capsule collider on them and the player has a character controller on them. The enemy's capsule collider is not a trigger

    I had used the same animation settings as the game tutorial did, with idle at -1, walk and run are at 0. The animations are named correctly, they are lowercase on the enemy and lowercase in the ORK Framework window. The same animation names are on the player and the player's animations are working fine. I only have one set of animations currently, and it is set on both the player and the enemy.
  • Try adding a Character Controller to your enemy, unless you're using some other movement component for your enemy (move AI, events).

    When not using a character controller, your enemy will be moved using it's transform, which doesn't use any sort of colliding ...
    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!
  • I've got a Move AI on the enemy, so I can't add a character controller. Is there some way to have a move AI but still have collisions being detected? I still have the issue of them doing their attack and then moving in closer. Ideally I'd want them to only move towards the player if the player moves out of range of the attack.

    I'm still stumped about the lack of animations on the enemies. Shouldn't the move AI be taking this into account as well?
  • You can use a Character Controller with the Move AI without a problem.
    If ORK should handle your animations (i.e. you're not using a custom animation controller), you need to enable the Auto Move Animation in the combatant's 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!
  • I did have Auto Move Animation turned on. I still wasn't getting any animations on movement, but once I put a Character Controller on the enemy, I was getting animations again. I have a different issue with animations but I will make a separate post for that.

    Also, adding the Character Controller seemed to fix the other issue I had.
Sign In or Register to comment.