Curo
Why am I still playing this game...?
- Reaction score
- 109
I've created a hero that can freely morph between two different forms (melee and ranged). This hero also has 2 hero abilities based off of orb of lightning (new). One of these abilities gives a chance to reduce enemy armour (in melee form) and the other gives an extra attack with cooldown (combined with searing arrows, in ranged form).
I have the problem where when my hero morphs, he loses these abilities. I'm guessing because the actual armour reducing and searing arrows abilities are unit abilities, morph doesn't want me to keep them. So that's fine, I just remove the ability then add it back every time I morph. This works fine.
1) The part I can't get passed is when my hero is in melee form, the armour reduction ability works, but if I morph to ranged form then back to melee, the armour reduction ability no longer works.
2) Additionally, how can I detect when a second attack is fired (via the orb of lightning/searing arrows combination)? Unit starts the effect of an ability doesn't seem to register the searing arrows being used in this way.
Also I should probably note that in order to have my melee ability working only in melee form and my ranged ability working only in ranged form, I have both the hero abilities (orb of lightnings) and the unit abilities (armour reduction and searing arrows) have the corresponding hero unit as a techtree requirement.
Would perhaps using UnitMakeAbilityPermanent instead of re-adding the hero abilities after morphing solve my first problem? If so, how exactly do I go about using this function?
I have the problem where when my hero morphs, he loses these abilities. I'm guessing because the actual armour reducing and searing arrows abilities are unit abilities, morph doesn't want me to keep them. So that's fine, I just remove the ability then add it back every time I morph. This works fine.
1) The part I can't get passed is when my hero is in melee form, the armour reduction ability works, but if I morph to ranged form then back to melee, the armour reduction ability no longer works.
2) Additionally, how can I detect when a second attack is fired (via the orb of lightning/searing arrows combination)? Unit starts the effect of an ability doesn't seem to register the searing arrows being used in this way.
Also I should probably note that in order to have my melee ability working only in melee form and my ranged ability working only in ranged form, I have both the hero abilities (orb of lightnings) and the unit abilities (armour reduction and searing arrows) have the corresponding hero unit as a techtree requirement.
Would perhaps using UnitMakeAbilityPermanent instead of re-adding the hero abilities after morphing solve my first problem? If so, how exactly do I go about using this function?