I've tried setting up damage dealers and damage zones as per this tutorial: http://orkframework.com/tutorial/game-tutorial/31-damage-dealers-and-damage-zones/

But they aren't working. I've gone over all the settings twice and they seem to be set up correctly. I've tried adding and removing both rigid-bodies and collider components from both the weapon and the target. Do I have to specifically tell the game which status is the HP? (the ability the attack uses is set up to reduce the HP consumable of the target.) Is there anything else I could be messing up?
  • edited March 2018
    Is this for following the gameplay tutorials or for your own project?
    The tutorial's setup is specifically for the gameplay project, i.e. it uses damage dealers only in real time battles.

    In case you want to use them in other battle systems, make sure the damage dealers are enabled for them and ability's battle events are also enabled for them.

    Also, using the Trigger types on the damage dealers requires a collider with Is Trigger enabled. The Collision types require a collider with Is Trigger disabled.
    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!
  • It's for my own project. My project is turn based so I made sure everything is enabled for tun based games. I didn't have colliders on the combatants because I was using character controllers. I added colliders and set them to triggers and that seems to have... done something.

    Now, the sword object (which actually has the damage dealer componant on it) won't trigger damage. But if the combatant wielding it is close enough to their target that the handle of the sword, and the combatants hands on it, enter the targets collider than damage is triggered.

    So basically:
    - if the combatant is far enough away that only the blade strikes the target when he attacks then no damage is dealt.
    - If the combatant is close enough that the blade handle and the combatants hands strike the target than damage is dealt.

    obviously I'd like it to be the actual blade of the weapon that deals the damage (=p). Can you think of any reason why this might be the case?
  • I've tried changing the range of the attack (it was set to the range template 1), but that doesn't seem to have any effect.
  • Sounds a bit like your collider on the weapon isn't big enough, or your damage dealer is attached to the wrong part of the weapon?
    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 March 2018
    Alright. I've made sure the collider encompases the entire weapon (and then some). That didn't change the effect. I've added an empty child object to the weapon, placed it in the blade, had the collider and damage dealer attached to child object instead of the parent weapon.

    and yet it has the same effect. This is strange to me because the weapon is large enough that to be close enough for the damage to go off the actual damage dealer is practically going around the opposite side of the target and not passing through the targets collider at all. (The collider, of course, still encompasses the whole weapon.)
    Post edited by Whatexists on
  • edited March 2018
    Also, just as a test, I've changed the collider so that it only encompasses the outer length of the blade that hasn't been doing damage. Now the attack never does damage.

    I've also changed the abilities range through each different range template and turned of "use own range." This doesn't seem to change when the ability does damage or when it doesn't.

    And as a final note, I've also found that the attack will damage the target as long as the attacker is within that range, even if the attacker is facing the opposite direction. (the animation may make the colliders still hit in that instance, I actually can't tell. It happens too quick to get a good look.)
    Post edited by Whatexists on
  • Hm, this sounds like you're actually not using damage dealers but the regular Calculate node in your battle events. Make sure the correct battle event is used by your attack (i.e. the one that activates the damage dealer, e.g. through auto activation).
    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!
  • Just to make sure I've done this right. (This is the way I have them set up already. I went over everything and double checked to be sure.)

    Under Animation Settings for the ability I've checked the Animate box and added an animation.
    For the Battle Event I selected a battle event I made titled, "attack no calculation". Chance is 100%. I've checked the "Turn Based" box for Perform In. And I've left all of the other settings as they are.

    For the "attack no calculation" event.
    It's a battle event.
    For event settings I've enabled "Auto Damage Dealers" and "Use Main Camera". I've added no prefabs or audio clips.
    I have only one node, it's a "Combatant Animation" node.
    It is enabled. Object is set to "Actor", Actor is set to "User". No child object. Time between is 0.25 seconds. Wait between is enabled.
    Under Animation "Wait" is disabled. Animation type is set to "Attack".

    There are no additional nodes.
  • Hm, yeah - there's your problem right there: your damage dealer has no time to do damage.

    Your setup basically activates and deactivates the damage dealer at the same time, because the event isn't waiting for the animation to end. Alternatively, you can also use a Wait node to wait for some time.
    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!
  • Thank you! That did it! Thank you so much!
Sign In or Register to comment.