edited February 26 in ORK Support
I created a combatant with a grid cell size larger than 1.
During it's turn in combat, the combat ai can't fire the grid move event, so the ai ends up doing nothing.

Here's the node i use in the combat ai:
https://dropbox.com/s/xi38yf8fg7umb5e/GridMove.jpg?dl=0

How can i make it work for these kind of combatants?
Post edited by Vlastan on
  • edited February 26
    Generally that should work like with a cell size of 1 - it just needs more space. Is there enough room for the combatant to actually move?
    Post edited by gamingislove on
    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!
  • Yes, i have plenty of space on the grid
  • edited February 27
    Is a player with a larger grid size able to move? Since they both use the same functionality for pathfinding, if it works for the player, it should also work for the enemy. It might be an issue with your AI setup in that case, e.g. not having a target to move to.

    Edit: Did a quick test and it works in my project, tested with a 2x2 size - both player and enemy could move.
    Post edited by gamingislove on
    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!
  • If i set up the player combatant with a larger grid size it works and i am able to move it around the grid.

    Here's a screen of the other nodes in the combat AI.

    A curious thing i noticed is switching the move type in the grid move event to random, will result in the npc correctly moving around the map. So i guess it could be something about not being able to find the target position.
  • Hm, tested it with the same setup and works fine here. If random movement is possible but not to the target, it either doesn't have a found target (though that'd not be possible due to the Get Nearest node before), or there's no path to the target.

    I assume both combatants are on the grid (otherwise they can't move on it) and are enemies?
    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 March 2
    They are on the same grid and the big combatant is set to the enemy faction.
    In fact, if the player is placed into the enemy combatant's melee range, it will correctly receive attacks as statet by the battle a.i.

    Edit: I set Move Over Enemies to True in battle grid settings and this made the combatant move near the player. However i am not sure this should be the correct solution. Maybe it could create unwanted side effects?

    Edit2: indeed it doesn't seem right as the larger combatant always ends its movement one cell inside the target (resulting in mesh compenetration) also i don't really want for combatant to move over themselves
    Post edited by Vlastan on
  • Something in your setup is interfering, though I'm not really sure what. It works fine here, with or without Move Over Enemies (or also Move Over Allies) enabled.

    I think it'd be best if you can send me a small Unity test project with your setup where this issue occurs. You can reduce the size of the project by deleting the Library folder in the Unity project's folder :)
    Upload it e.g. to dropbox and send me the link to contact@orkframework.com.
    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!
  • @gamingislove I changed the maximum distance from target destination in the grid node of the battle ai to 2 instead of 1.
    Now it seems to work correctly. Do you think this could be the cause of it not working before?
  • Can you give me some details on your combatant's grid size set up?
    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!
  • Sure,here's a screen.
    Maybe i'm setting this wrong?
  • edited March 4
    Hm, yeah, seems there's an issue - I'll look into it.
    Post edited by gamingislove on
    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!
  • Alright, I've looked into it.
    The issue is that the combatant can't reach the target cell due to it's size, i.e. your changed maximum distance is the solution for this.

    Generally, using a larger maximum distance with the Nearest target cell will move to the nearest possible cell to the target, so taking the largest size your combatants can have should do the trick, e.g. in this example, a grid size of 1 means it'll need a maximum size of 2 to take the extra cell around the combatant's actual cell into account.
    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!
  • So in the move event i should set the maximum cell distance according to the largest combatant i have in the game.
  • Either that or have separate battle AI with that grid move setup for large combatants.
    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!
  • All right, thank you for the answers
Sign In or Register to comment.