Recently, I've found that my test game will lock up as soon as I select for my player combatant to attack a hostile combatant in Turn-based, Active Time battles. The turn value of each combatant involved continues to cycle upward, and I can observe that a series of object variables I've linked to user and target combatants in my attack animations are returning seemingly normal values, but input control isn't being returned to the user after the attack ends, like it should. To help in troubleshooting, I'd like to state a few things right off the bat:

-Auto attack is unchecked for both user and target combatants.

-The attack ability itself is not set to use auto attack

-The ability is not set as 'Counterable'

-No counter attack is assigned to either the user or target combatant

-The attack ability is set to 'End Turn'

-The final linked battle animation also terminates in a node that ends the combatant's turn


One further thing I feel compelled to mention is that both the User and Target combatants use the same prefab, but surely that wouldn't cause such an issue if their Object variable component is set to use local variables.
  • Try removing the End Turn node, as that has the potential to disrupt the battle. It's also not needed as the ability is already set to end the turn.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • I will, but I only added that node after discovering this issue. It happens with or without it. Once I select a target and attack, both combatants just cycle back and forth attacking one another, and I lose input control.
  • Hm, that sounds like the attack triggers another attack by the target, which triggers another attack by the user ...

    If this would be normal counter attacks, the counter attack can't be countered, so I'm guessing you're using some custom system, e.g. using a Use Battle Action node to to perform actions as sub-actions?
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • I don't believe so, but I'll go through all of them and check. I've parsed my attack events into a series battle animations so that I can run them only to a certain point and stop if need be, and the loop happens from step one which simply checks the distance and orientation of two combatants and records them as variables. It does nothing other than create a set of preliminary notes for subsequent events to use.
  • Update: It looks like an A.I. node that I added to my preliminary event was causing that particular section to loop. Subsequent event steps are still causing the loop to occur, so I'll have to debug those as well, but this is a promising discovery. Thanks!
  • Moving the User Actor is causing both User and Target to move. This is happening with every movement node (Change Position, Change Navmesh Target etc.) even when the movement node is linked directly to the Event Settings node with nothing in between the two. All proceeding and subsequent events now seem to be running correctly, apart from this step.
  • It looks as though time might be the issue. More specifically, any node requiring a certain amount of wait time inside of the event, whether via movement or just selecting to wait, is causing the Target's attack to occur before the original user has had a chance to finish with their own, which is probably causing certain dependent variables to get crossed-up inside both combatants' events. I'm not sure what I've done to create this issue, but it was never a problem until recently.
  • Still hoping for an answer to this problem. Essentially, instructing the event to 'Wait' for any length of time allows the target combatant to start their own turn and both the original User and Target continually attack each other in an infinite unbreakable loop.
  • This would only be the case if you're using dynamic combat, which allows for multiple actions to occur in turn based or active time battles. Attacking in a loop without the player having to select an action (unless they're all AI controlled) could only occur if it's told to perform an action somewhere in your events.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Nope, It's not dynamic combat, unless there's an alternate place to set dynamic combat that I haven't noticed. Dynamic combat in battle settings is unchecked. Also, the player is not set to AI.
  • Hm ... yeah, I guess I'll need a Unity test project with your setup where this happens to look into it.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • It's a pretty large project at this point, and polluted by some 3rd party assets. I'd rather send it to you as is so that nothing gets decoupled, but perhaps it would be best for me to email you a list of licensed third party assets to see if I do in fact need to remove some prior to sending you the project.
Sign In or Register to comment.