edited January 2021 in ORK Support
Okay, so I'm struggling to wrap my head around this one. For my real time grid battle, I'm trying to make a system where the player moves like in Megaman Battle Network or One Step From Eden. Like so:



As of right now, though, I have to call a battle menu, select a tile, accept, and then the player moves. How would I set it up so that an input from either the horizontal or vertical axis (based on an offset of the camera orientation) will result in one automatic tile move if there is a tile available to move to? (and that's without calling a battle menu or accepting the action)

Bonus: How would I animate each action separately? (move left of player orientation triggers a move left animation, move right triggers move right animation, etc.)
Post edited by braytendo on
  • You can set up grid movement into the 4 directions as separate abilities (e.g. moving one cell forward, selecting the cell via a Store Grid Cells node) and use them via a control map.
    Animation can easily be handled that way as well, as each direction has it's own ability and events for animating it :)

    Another alternative would be writing a custom player controler that handles grid 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!
  • Thank you, this ended up being pretty easy to implement! I'm glad I can even check if it's a player or enemy tile to limit the movement options. :D

    GIL out here making the most robust RPG framework that works out of the box for a Megaman Battle Network setup without specifically designing it for that.

    Ya just can't help but be impressed, lol.
  • Eh, it just works :D
    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 June 2021
    So now I'm attempting to set up my movement battle AI, and I'm running into a couple problems.

    I'd like for certain enemies to only move up and down within their column, but still move toward the player's row. I thought using a mask would solve this, but they're not staying in their columns.

    Also, when my player gets to the bottom tile of his column, the enemy stops at a diagonal tile to the player. I assume because it's trying to move to the tile directly above the player (probably first one the AI sees as being closest), but it can't move there since I'm clearing the grid path in the battle animation event if the enemy tries to move onto a player grid cell type, so then it gets stuck in a loop (I assume). This is bad, cause then the player can just move to the bottom row to avoid attacks.

    Any ideas to solve these issues?
    Post edited by braytendo on
  • Are you using the Grid Move AI node for this or an ability?

    I guess using an ability that checks if the combatant needs to move up or down (e.g. via position checks) might be the better option.
    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 June 2021
    That sounds like a good option, but I guess I'm not sure how to use a position check?

    I tried an "In Use Range" node with a custom use range mask of all the below tiles for below and above tiles for above, but In Range never seems to be true for either, not sure what's happening there.

    EDIT: I got it to work if I used a battle range template on the "in use range" node, but the exact same setup doesn't work when I try to use a custom use range, so I'm thinking that might be a bug?
    Post edited by braytendo on
  • edited June 2021
    I'll check it out, might be a bug.

    Edit: Yeah, that's a bug - the custom range is currently not used at all in the check node.
    Will be fixed in the next update :)
    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!
  • Thanks GIL! :D
  • edited August 2021
    Quick question. I noticed that while a combatant is currently moving to their destination cell, it shows the new cell as "marked for" but empty. Does a cell being "marked for" mean that it cannot be claimed by another combatant? And would an "is grid cell empty" node also check for this?

    EDIT: I'm pretty sure this must be the case. Nobody is running into anybody or anything, and I can't be THAT lucky lol.
    Post edited by braytendo on
  • Yeah, the cell being marked for the combatant will block it for others as a possible movement target to prevent 2 combatants moving to the same cell.
    There's an option in case you don't want to use it - disable Mark Target Cell in the move command settings (Battles > Battle Grid Settings) for the player's move target selection. AI controlled combatants have that option in the Grid Move battle AI node.
    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.