edited January 2021 in ORK Support
Is it possible to have the player move in real time and when he runs into an enemy, start a grid battle exactly where everyone is standing. To skip the placement selection phase and automatically place everyone on a grid cell exactly where they are already standing. And also to keep using the same camera (position).

Alternatively, can the enemy behave with AI commands such as patrol, with a detect enemy range (even line of sight), during a grid battle.
Post edited by D4rklight on
  • Use a Place On Grid node for that - it'll place spawned combatants (e.g. the player) on the nearest free grid cell, optionally only using deployment cells.

    As for patrols, no, at least not using the move AI. Combatants not taking part in the grid battle can still move around via the move AI, but everyone on the grid needs to use grid movement, i.e. for enemies via the battle AI Grid Move 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!
  • edited January 2021
    I still can't get a spawned combatant to start a grid battle.

    In the combatant spawner, I tried Battle Settings>Battle Type>turn based.
    Then in Battle Settings>Battle Object I put a grid battle starter (object) from the scene wizard, with a grid battle start event. I still had to use player grid placement and the enemies were only on the grid sometimes by chance.

    I also tried Battle System>turn based battles>default start events>start event, and added the grid battle start event. It created the grid but I couldn't move or select an enemy after I chose my attack type.
    The grid battle start event had Place on grid>actor>enemy group/player group.
    Place on grid still wanted me to select a cell to place player on.
    Post edited by D4rklight on
  • If you still have a Player Grid Placement node in your battle start event, it'll cause the player grid placement, so make sure it's removed (or disabled).

    As for the rest, I'd need to see more about your setup, e.g. since you're using spawned combatants, are you also using a Battle component (i.e. using the nearest battle in the spawner)? If so, is it set up to use the nearest grid (or a defined grid) for the battle? If not, that should automatically use a grid.
    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!
  • The Player Grid Placement node is disabled.

    I am using a Combatant Spawner with a Battle component, Use Nearest Battle.
    I don't see a way to set it up specifically for a grid battle.
  • Player grid placement only happens when actively called via node - do you have multiple battle start events set up in the project? It might still use a different battle start event, e.g. due to being set up in the Battle component to override the default.
    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!
  • The Combatant Spawner is triggering the battles. I only have Battle System>turn based battles>default start events>start event- with a place on grid node. Even if I use the gridBattleStart from the tutorial I can place the player on the grid, one enemy is placed on the grid, and one is not. But of course if I use a Battle Event instead of a Combatant Spawner everything works fine.
  • Also for grid battles, is it possible to make an attack that first moves to the enemy, where ever he is standing, and then attack? So that the attacker will move to a specific cell (in front or back of the enemy) and then attack.
    Can an empty cell in front of the enemy be marked, and then the attacker move to that mark and then attacks?
  • edited January 2021
    Could you maybe post an image of your battle start event's nodes? Also, try adding a Wait node (even 0 seconds to continue in the next frame should be enough) before the grid placement to leave Unity enough time to spawn the combatant game objects.

    You can use a Store Grid Cells node to store a path to a cell and use that like in a regular grid move event. To select a cell (e.g. in front of the target) also use a Store Grid Cells node, e.g. using a battle range template instead of a path.
    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!
  • edited January 2021
    My Start Event is:
    Show Battle Grid > Wait (0.1) > Place on Grid (actor, enemy group) > Place on Grid (actor player group).

    The player and one of the two spawned enemies are placed on the grid.
    The Start Event is placed in Battle System>Turn Based Battles>Default Start>Start Event.

    Is there any other place I can use to start the Start Event?
    Post edited by D4rklight on
  • Only in the battle system's settings and the Battle component.

    Are the 2 enemies coming from a spawned group, or are they 2 separate combatants/groups and join the battle via the Auto Join Settings (Battle System > Battle 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!
  • edited January 2021
    Ok it looks like auto join works. If I add separate single enemies on a Combatant Spawner and use auto join everyone is placed on the grid.
    Thank you very much.

    The only problem I see now is that if I add 4 enemies and one moves to attack, and his path is blocked by another enemy, he gets stuck there. I want the enemies to walk around each other. I have Battle AI>Grid Move>Avoid Allies enabled.
    How can I make enemies move around other enemies instead of going through them?
    Post edited by D4rklight on
  • Without using Auto Join only the enemy that initiated (touched) the player would be part of the battle.

    Check your Battle System > Battle Grid Settings > Move Command settings. Move Over Allies should be disabled if you don't want combatants to move through their allies.
    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!
  • That was it.
    Thank you.
Sign In or Register to comment.