edited June 2016 in ORK Scripting
I've been trying unsuccessfully to activate and deactivate the Damage Dealer on a weapon via script.

I'm doing it this way so as to tighten up the hit detection a bit. I have Animation Events set up on the frames of the Mecanim animation that indicate when I want it to activate and when I want it to deactivate. I have an "Animator Monitor" component on my player prefab which handles the Animation Events which then notifies a component (via pub/sub messaging) on the weapon hand to activate or deactivate the Damage Dealer.

This part works perfectly and the call to DamageDealer.SetDamageActive() is made. But nothing happens with the Damage Dealer.

I've tried various settings on the DD and on the Ability that starts the animation. I've tried turning off all of the auto-activate settings.

Clearly I'm missing something here; I'm pretty sure I'm calling the correct method, and I'm passing it new [] {"weapon"} in the activation tag parameter. So I'm guessing that there are settings elsewhere that might be interfering.

@gamingislove, can you shed some light on this?

EDIT: sorry, this should be in scripting rather than general support.
Post edited by gamingislove on
  • You need to first set an action for the damage dealer (SetAction function), otherwise it'll automatically be disabled after 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!
Sign In or Register to comment.