I have a few questions pertaining to using damage dealers.

1) Is there any chance we could get a custom event instead of simply OnTriggerEnter? I've coded my own custom collisions using Physics.Sphere(NonAlloc) for a few reasons. Its simple, efficient, can be easily dynamically animated, AND can be called whenever I want. Including AFTER the animation step which is huge for me. If you want responsive collision detection in Unity this is a must, as normally OnTriggerEnter is called before the animation step meaning there is a frame where two colliders are touching being displayed but no collision until the next frame.

2) How specifically does ORK handle these collisions to prevent duplicates? For example say I have an electric sword swing. The sword passes through, but i want it to leave a trail of lightning to widen its hitbox. This would most likely involve spawning more damage dealers, but if i've already hit an enemy I dont want to hit it twice. Likewise for combo attacks. Rather than OnTriggerStay, what if I want to re-activate a damage dealer based on an event/timing? Like say a sword stab and then the player presses another button causing an explosion at the tip of it.

Thats all I can think of right now. If @gamingislove can provide solutions for this that would be great but I'm not above coding something custom if I could be led in the right direction.
  • 1) Sure, what would you need for that?
    I can e.g. add a Custom type that does damage when you call a defined function.

    2) That's handled by the Damage Settings of the damage dealer, e.g. enabling One Time Damage makes sure a combatant can only be hit once by the damage dealer per activation.
    For combo attacks, you have to activate/deactivate the damage dealer for each attack in the battle event. The explosion could e.g. be handled by spawning a prefab with a damage dealer and activating it in the battle event.
    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!
  • 1) That would be great. Physics.OverlapSphere simply returns an array of colliders. So as long as the Damage Dealer can detect Damage Zones through that function it should work. I would then probably make separate components called hitboxes that call the function on their parent damage dealer.

    2) Ah, perfect! That should work then!

    Thanks for the quick response as usual! While I have you here I had another proposal/question on how something may work.

    Basically you have the systems laid out for something I want to do. You can have weapons give characters abilities, and then by using the weapon characters can learn the ability. Well my game has real-time battles where the player can set the abilities to their shortcut slots.

    I've had this idea where weapons also have bonuses for each shortcut slot. For example I could have Shadow Dagger with 4 shortcut slots. Up/Down/Side/Neutral+Attack. Whatever ability you set to Up+Attack might have invincibility status at the start, while Side would cast a Shadow Geyser spell at the end of the attack. I know theres a way to check shortcut slots through event nodes, but is there a way I can add these passives/status boosters to work intuitively?
  • 1) Alright, will add a Custom type in the next update. The function that you can call to do custom damage would require the game object that was hit and a position (Vector3) and rotation (Quaternion). Position/rotation are used to optionally spawn the effect prefab, so they can be ignored if you don't need this.


    Hm, other than using the Check Shortcut node in events, there's not really another way to do this ... if they're triggered when using the attacks, you'd just have to check this in the attack's battle events.
    Otherwise, you could perform regular checks (e.g. using global events or autostart events on the combatant's prefab) and add/remove status effects that handle these bonuses.
    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!
  • Alright I'll try that out! Is there a way to pull a formula/call an event based on bonuses the equipment has?

    It would be nice to do passive things like "Light Attribute Attacks add x of your Magic Attack" and such.
  • edited November 2017
    Well, you can do that in your damage formula, e.g. check if the weapon is equipped and do a different calculation based on that, or use equipment variables ... or set up status values to handle additional damage :)
    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!
Sign In or Register to comment.