edited February 2019 in ORK Support
image

Here's an interesting problem I've run into!

So, for one of our abilities, there's a whip. If you hit an enemy with the tip of the whip (note the two separate damage dealers), it deals critical damage. Each damage box belongs to a separate ability, one with 100% crit rate.

These damage dealers are Always On, and set to the Player combatant due to how we've set up our custom systems.

Here's the problem though: it works great, as long as the Enemy touches just a single one of the damage dealers. If it happens to be right in between, or if the enemy is large enough to hit both, it deals damage from both abilities.

----------

Any ideas for a method to make it so that if an enemy hits both colliders, it defaults to the 'Normal' collider and ignores the 'Critical' collider? The ability can hit more than one enemy at a time, as well, so you could hit 2 enemies with normal damage and another with crit damage.

----------

An idea I've thought about:

I could lessen it to a single damage dealer, and and in the battle event, check the distance between the User (would it be the damage dealer object, in this case?) and the enemy. If the Enemy is X distance away, then I could point to a different Calculate with a higher Damage Factor.

It would probably be easier to do a check to see if the enemy is intersecting with a collider, but I don't *think* ORK battle events support that?

The problem with this is mostly cosmetic; as I am only able to change the damage factor so my flying text registers as normal damage instead of crit damage. Maybe if Calculate had a FORCE CRIT option?

----------

Any ideas?

Post edited by Kirb on
Tactics RPG Grid Battle System for ORK
---------------------------------------
Personal Twitter: https://twitter.com/AMO_Crate
I make RFI! https://twitter.com/NootboxGames
  • Update: My idea worked! Sorry for using the forum as a rubberduck debugger. :D

    I was correct in that it's impossible to change the hit to a CRIT while calculating, though. Would it be possible to get an option in the Calculate node that allows us to change the current crit rate? (unless there's another method I missed?)
    Tactics RPG Grid Battle System for ORK
    ---------------------------------------
    Personal Twitter: https://twitter.com/AMO_Crate
    I make RFI! https://twitter.com/NootboxGames
  • Update 2:

    I found a solution, thanks to writing it all out here, again. :)

    I gave the ability a unique formula for its Crit Chance (called "ForceAbilityCrit").
    In that formula, I do a global variable check to see if the variable ForceAbilityCrit = TRUE.

    If it's true, set to 100. If false, set to 0.

    Then, in the ability's damage dealer battle event, before the calculate node, I do my distance check. If the enemy is far enough, then I change ForceAbilityCrit to True, and then calculate.

    Since the crit formula will see that the bool is True, it sets to the Crit rate to 100, and presto.

    This was satisfying to work out. :D
    Tactics RPG Grid Battle System for ORK
    ---------------------------------------
    Personal Twitter: https://twitter.com/AMO_Crate
    I make RFI! https://twitter.com/NootboxGames
  • Have you considered using status effects for a similar result? I'm not a programmer at all so I have to find workarounds for issues like this. Which is happening for me as an enemy has multiple hitboxes and my PC has always on damage dealers as well.

    Was thinking of running a status effect and a 0.1second delay on the damage event to check for those specific status effects before running damage.
    IE (even if she hits more than 1 hitbox a status effect that won't stack will prevent multiple damages in 1 attack)
    Miuratale : coming 2024
    Miuratale
  • You can also use status effects to give the target a short immunity to damage by adding a status condition with a Negative change block.
    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!
  • @Kirb this is an awesome mechanic btw :)
Sign In or Register to comment.