I modified grid battle example project, so it battleGridStart asset spawns player group rather than ally and then use Place on Grid Node. I disconnected Player Grid Placement Node. It works as intended, player spawns automatically after the battle starts, without placement selection phrase. You can move, fight etc. All works fine.

However in my main project the same node arrangement doesn't work. Player spawns on the grid, however it can't move, attack or rotate. Using Player Grid Placement Node fixes this issue. However I want player to spawn without placement selection phrase and I want to use NPC Spawner. I see nothing in battle setting that could cause this issue (battle plays as indented when using Player Grid Placement). When I use NPC Spawner to spawn enemy, enemy gets the same problem as I had, however enemy spawns normally when spawned through add combatant in battle component.


My only clue is that it may have something to do with other issue I fixed myself. In MoveCommand asset in Change Position node I had to deactivate Controller Move, otherwise the game stopped executing nodes in the moveCommand asset (tested it by putting bark node after Change Position node), character didn't move to the destination and I could walk him freely on the grid. I use Ork built in Player Mouse Controller. Problem persisted both on grid tutorial MoveCommand prefab asset and battle grid example project MoveCommand asset , in both cases it was fixed after deactivating Controller Move in Change Position node.
  • Try adding a Place On Grid node that either places all combatants or at least the player group after the player is spawned.

    As for the controller move blocking the grid move events - that's most likely due to another collider blocking the movement physically.
    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!
  • This is exactly how my setup looked like before I asked the question :) I have also noticed that Place on Grid without Player Placement stops enemies from executing their battle AI.

    There is no other collider in vicinity of the battle than player collider and enemy collider. People are walking on the plane.
  • Hm, that's strange - definitely working in my test projects. If you send me your battle start event to contact@orkframework.com I can check it out.

    If your grid cells (prefabs) also have colliders, they might also cause blocking 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!
  • I don't have colliders on cell prefabs. I send you both battle start events I tried, however one of them works without problems in grid setting example, so it can't be game start event fault.
  • I'll check them out, but if they're working in one project and not the other, I'll probably need a small Unity test project where it happens, as it could also be a result of some other setting or something in the scene interfering ...

    I'll let you know :)
    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 May 2019
    I think your issue comes from destroying the player and spawning it again without any wait time between.

    Try adding a Wait node after destroying the player, e.g. with a 0.1 second wait.
    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! It works! I love you man:)
    Question: Why there is a need for adding Wait nodes? It is not the first time I see adding Wait solves a problem.
  • In this case it's needed because Unity doesn't destroy or spawn game objects immediately when the node is used. This can lead to following nodes still using the game objects that will be destroyed by Unity.

    In case of Mecanim animations, since there's no direct control over the animator, you sometime need to wait for transitions or changes from ORK's auto move animation to be used before firing the next animation. E.g. playing attack animation directly out of movement can be overruled by the idle animation kicking in due to stopping the combatant. A short Wait node in this case allows the idle animation to play before the attack animation is used.
    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.