edited February 26 in ORK Support
Hello!

I'm having an issue where enemies move in a very sub-optimal manner in a phase battle.

image
image

In the first image, you can see the enemies before movement and after movement. (Note, there's a light blue blob in the bottom corner, you can't see it in the first image, but it's right below blob C). The image below shows the battle AI blobs use.

The AI for the blobs is pretty simple: Is there an enemy in attack range?
Yes: target the weakest enemy and place yourself next to them.
No: target the nearest enemy and move as close as possible to them.

The ''Yes'' part works well, but the enemies behave weirdly with the ''No'' part, when they can't reach anyone this turn.

As you can see in the middle image, I have traced in red the path walked by 4 blobs, who all have a movement range of 3, and move in alphebetical order (the light blue blob, hidden below Blob C, move after yellow blobs). Blob A behaves correctly. Blob B is also fine as the tile the closest to the red warrior is under Blob A.

However, Blob C and the Light blue blob (that was below Blob C) are idiots. I have traced in blue a path that would have gotten them closer to the enemies.

I don't know why, but my enemies always place themselves in a line like that when they're too far to reach enemies.

Have any clue how to optimize their movements and get them closer to enemies? I have done a lot of tests using different options in the grid move node, but there are so many options... and had little success.

Thank you!
Post edited by max_power on
  • Since you move toward a target, what's the Get Nearest node's setup like?
    Also, do you have the same use costs on the different cells, or e.g. has the path lower cost than the gras?

    And, probably most important, when are the other enemies moving? E.g. the other blue slime - based on the image, that'd block any other path as long as it's on the cell before 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!
  • edited February 27
    Thank you for the reply!

    image

    The Get Nearest node is set up like that.

    All the non blocked cells in this map are the same and cost 1 movement. (I've just double checked just to make sure.)

    As for the other enemies moving, the yellow blobs at the top move before, but they're never in the way. As for the other blue blob you're talking about, I've just made a test by removing it entirely, and the 4 blobs I've talked about in my previous post ended up at exactly the same spot.

    (I also tried disabling ''Use Body Parts'', but since I don't use that feature, it obviously didn't change a thing.)
    Post edited by max_power on
  • Alright, I'd be best if you can send me a Unity test project to check this out.
    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!
  • Ok thanks! I'll send it to you tomorrow!

    Thanks a lot!
Sign In or Register to comment.