edited November 2019 in ORK Support
Sorry for all the issues, but working a lot on getting this going and lots of little things popping up.

With my real time battles if I'm button mashing and the character is attacking constantly and kills the AI then as soon as the AI dies it prevents any more attacks from being executed. However, as soon as I move up to the next AI, it starts executing attacks without touching any attack button. It's somehow got extra attack events queued up that didn't get performed because the previous AI died, but now it's executing them. Is there a way to clear this input queue when an enemy dies?
Post edited by tomjscott on
  • The event sounds like it got stuck at some point and is waiting for a valid target.
    Can you screenshot the battle event for that attack?
    Miuratale : coming 2024
    Miuratale
  • Here it is. It's very simple.

    https://imgur.com/a/IoyOzl1
  • edited November 2019
    Is the 'attack' ability usable in the field? Looks like it might only usable in combat. Try setting it to 'both'
    That would explain why it pauses in till you have a target
    Post edited by Wrofir on
    Miuratale : coming 2024
    Miuratale
  • Something else I am noticing that might be related. When I first approach an AI, I see that the attack event runs several times on its own before I even press the attack button. However, when it runs like this, it doesn't actually perform the attack, but the event is run and I have a debug output showing that it's running. It also seems to just run a lot on its own and printing the debug message I added, but not actually attacking. So there is some weird issue where it's auto running the event sort of. I don't know why it would do this since I have Player Control set to none so that I can have a third party controller in charge. I'm starting to wonder if somehow the AI is running the attack event and that's why it doesn't actually show the player attacking. Not sure why the AI would have this event run though.
  • Wrofir said: Is the 'attack' ability usable in the field? Looks like it might only usable in combat. Try setting it to 'both'
    That would explain why it pauses in till you have a target
    I change it to Both and the same thing happens.
  • The AI would control your character if the player isn't, so you may be on to something.
    Without a battleAI the AI would just spam the default attack too.
    Miuratale : coming 2024
    Miuratale
  • Wrofir said: The AI would control your character if the player isn't, so you may be on to something.
    Without a battleAI the AI would just spam the default attack too.
    Except I have the AI set to No Animations. Where would it call the attack event? Is there someplace I can't find that tells it to use the event?
  • Could it be the Attack ability? I'm not at my computer at the moment, but the thought just occurred to me. Although I thought I removed that ability from the AI, but I could be wrong.
  • OK, so it turns out that the AI indeed had the same Attack ability as their Base Attack and that's what was calling the attack event. Once I changed that, it no longer shows the debug of it looking like the player is attacking all by itself. However, I still see the original issue where the attacks are queued up and when I approach the next AI, they execute without me actually initiating anything.
  • I haven't read the whole thread - but something to keep in mind with the battle AI (or the combatant's AI selecting actions) in general:

    The base attack is the default fallback if no other action was found/used by a combatant. If you don't want that, add a battle AI that only uses the None action (i.e. doing nothing) and add it as the last battle AI of the combatant.
    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 said: If you don't want that, add a battle AI that only uses the None action (i.e. doing nothing) and add it as the last battle AI of the combatant.
    I'm not sure I follow. You say it should only have None, but it should be the last battle AI. If it's the only one then how can it be the last as well?

    Anyway, I don't want it to do nothing. I have a Battle AI calling some attack functions on the third party AI, but I didn't want it doing the same Base Attack as the player so I fixed that.

    However, that was just a side issue. The main issue is the queued up attacks, which I can't seem to get rid of. Everything else we discussed in this thread has been solved.
  • What I meant is that your (battle) AI controlled combatants (i.e. all enemies) will use their base attack if the battle AI didn't use a different action. You can prevent this by using the method I mentioned above.
    In real time battles I'd also recommend using the Timeout setting (in the combatant's AI Settings), to prevent them from spamming the attack without any pause.

    Regarding your player spamming the attack - how are you selecting the attack action for the player?
    Also, check if your player's Auto Attack Settings are set to be active.
    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 additional attacks, which seemed to be from the player were actually the AI calling their Base Attack, which was the same attack event that was meant only for the player. I since corrected that.

    For the player, the attack action is triggered in Real Time battles by pressing the attack input. This calls the Attack Ability, which fires the attack battle event. In there I am calling a function to a script on my Invector controller to trigger the correct attack animation. The player does not have Auto Attack on.

    What seems to happen is that it does not allow me to fire off an attack when just running around the area, but when an AI is within range then I can attack. But if I kill one AI and press the attack button a few extra times, those attacks do not get executed until I get in range of another AI. Then they execute without me touching any more buttons. I'm not sure if this is due to some input queue in Unity or Windows or something ORK is doing to cache them.
  • What's your attack ability's target setup like?
    Mainly target type/range and the use range (or default use range if used).

    There's a difference in use between an attack where you'd just swing around a sword and whatever is hit will take damage and an attack that first selects a target.
    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 just set up the parameters from the tutorial.

    Enemy/Single
    Use Own Range: checked
    Default range: None
    Realtime Range: Template/Range 1
Sign In or Register to comment.