Ability permanence and morphing

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?
 

WCGMapMaker

New Member
Reaction score
3
My helms deep map has units that switch from archer mode to sword mode, perhaps you want to look at my triggers in the map? i also have legolas and aragon having capabilities to switch modes. Its fairly simple and its in GUI but perhaps it will be similar enough to help you, let me know and i can give you unprotected version.
 

Curo

Why am I still playing this game...?
Reaction score
109
@ Never Quit: I already do that. If I didn't, he would lose the ability. My problem is not that he doesn't have the ability, but rather that it just doesn't work.

@ WCGMapMaker: I've got the actual switching between the forms down. It's just that the ability that goes with the melee form doesn't seem to work after I morph, even though I re-add it through a trigger, as Never Quit suggested. However, if one of your units has an ability based off Orb of Lightning (new) that has techtree requirements, I'd love to see it.
 

polo2005

Wana start playing LoL? http://tinyurl.com/369as27
Reaction score
97
I would use Robo-Goblin for switching between range and melee attacks, nad if the orb of lightning is a hero spell, i would base the ability on atribute bonus as a dummy spell with hided icon. and then check if my hero used melee transform or range transform for adding right orb of lightning spell.
 

Curo

Why am I still playing this game...?
Reaction score
109
I'm using Raven Form atm, and it works fine. What's the difference with robo goblin?

So for the first problem, I remove the melee hero techtree requirement from the hero ability (not from the orb of lightning ability though), and it now works even after morphing.
 

Bogrim

y hello thar
Reaction score
154
You can't detect when a second attack is fired. However, you can detect when a unit takes damage and a buff is applied in the process, such as Poison Arrows. If you make Poison Arrows your second attack, it will allow you to detect the attack by filtering out the damage source using the buff.
 

Curo

Why am I still playing this game...?
Reaction score
109
You can't detect when a second attack is fired. However, you can detect when a unit takes damage and a buff is applied in the process, such as Poison Arrows. If you make Poison Arrows your second attack, it will allow you to detect the attack by filtering out the damage source using the buff.

I had that idea, but I'm having some trouble with it. The duration of my poison buff is 0.1 sec; is that too low? Also which buffs do I need to use and check for, since poison has 3 (stacking, non-stacking, info). I used another spell that checked for the non-stacking poison buff and it worked, but this one doesn't seem to work.

Edit: Tried 0.5 sec duration. I can see that the buff isn't even showing. Hmm...? I'm using both a stacking and a non-stacking buff, but no info buff. I do the same with all other poison abilities in my map, and it works just fine.

Also I seem to be having problems again with the melee form armour reduction ability not working after I morph, but only in some games. Additionally my ranged second shot ability isn't working at level 1 now, again only in some games. I had this problem once before, but it mysteriously disappeared. Is Orb of Lightning just glitchy as hell? Might it have something to do with the form (axe/bow) the hero is in when he learns the ability?
 

Bogrim

y hello thar
Reaction score
154
I had that idea, but I'm having some trouble with it. The duration of my poison buff is 0.1 sec; is that too low? Also which buffs do I need to use and check for, since poison has 3 (stacking, non-stacking, info). I used another spell that checked for the non-stacking poison buff and it worked, but this one doesn't seem to work. Perhaps it is because my duration is too short.
The duration doesn't matter since you're checking for the buff at the exact moment it's applied to the unit (at the damage event). For that same reason, there's no reason to change the buff's duration since you can just remove the buff with triggers.

As long as any of the stacking flags are checked, you can use any custom buff. The non-stacking poison buff will always be used if all the stacking flags are unchecked, regardless of your input in the buff field. The info buff doesn't do jack.

The reason for your buff is bugging is properly because your poison doesn't have any effect (such as damage over time or stat reduction). When the poison doesn't do anything, the buff won't appear.

I recommend leaving the poison data fields unchanged, and just removing the buff as the first thing in the trigger. Here's an example of a trigger I made using Poison Arrows:
Trigger:
  • Ability Poison Arrows
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
      • ((Triggering unit) has buff Poison Arrows (Dummy)) Equal to True
    • Actions
      • Unit - Remove Poison Arrows (Dummy) buff from (Triggering unit)
      • Set Temp_Point = (Position of (Triggering unit))
      • Unit - Create 1 Dummy Unit for (Owner of GDD_DamageSource) at Temp_Point facing Default building facing degrees
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Acid Bomb (Poison Arrows) to (Last created unit)
      • Unit - Set level of Acid Bomb (Poison Arrows) for (Last created unit) to (Level of Poison Arrows (Ranger) for GDD_DamageSource)
      • Unit - Order (Last created unit) to Neutral Alchemist - Acid Bomb (Triggering unit)
      • Custom script: call RemoveLocation( udg_Temp_Point )
 

Curo

Why am I still playing this game...?
Reaction score
109
The duration doesn't matter since you're checking for the buff at the exact moment it's applied to the unit (at the damage event). For that same reason, there's no reason to change the buff's duration since you can just remove the buff with triggers.

As long as any of the stacking flags are checked, you can use any custom buff. The non-stacking poison buff will always be used if all the stacking flags are unchecked, regardless of your input in the buff field. The info buff doesn't do jack.

The reason for your buff is bugging is properly because your poison doesn't have any effect (such as damage over time or stat reduction). When the poison doesn't do anything, the buff won't appear.

I recommend leaving the poison data fields unchanged, and just removing the buff as the first thing in the trigger.

That's a lot of good information, thanks. I'll rep you when I can.

However, I don't think having no effect stops the poison from applying. I have another hero that has a modified slow poison with no values (it's used only to apply a buff when the hero attacks), and it works fine.

I reset the duration to 10 and put the damage at 1 per sec. I also turned on the damage stacking flag and removed the non-stacking buff. The poison still doesn't apply.

Then I tried going back to the original ability, but it seems that it still doesn't want to work with orb of Lightning. I get the second shot, but no buff. I suppose I'll try cold arrows next....

Edit: Lol, FML, Cold Arrows doesn't work either (even with data fields unchanged) :(

I also remove the line ((Triggering unit) has buff Second Shot) Equal to True
from my damage detection trigger to make sure there wasn't something wrong with said trigger. It works just fine without the buff check. So it means the buff is definitely not being applied.
 

Ayanami

칼리
Reaction score
288
The duration doesn't matter since you're checking for the buff at the exact moment it's applied to the unit (at the damage event). For that same reason, there's no reason to change the buff's duration since you can just remove the buff with triggers.

As long as any of the stacking flags are checked, you can use any custom buff. The non-stacking poison buff will always be used if all the stacking flags are unchecked, regardless of your input in the buff field. The info buff doesn't do jack.

The reason for your buff is bugging is properly because your poison doesn't have any effect (such as damage over time or stat reduction). When the poison doesn't do anything, the buff won't appear.

I recommend leaving the poison data fields unchanged, and just removing the buff as the first thing in the trigger. Here's an example of a trigger I made using Poison Arrows:
Trigger:
  • Ability Poison Arrows
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
      • ((Triggering unit) has buff Poison Arrows (Dummy)) Equal to True
    • Actions
      • Unit - Remove Poison Arrows (Dummy) buff from (Triggering unit)
      • Set Temp_Point = (Position of (Triggering unit))
      • Unit - Create 1 Dummy Unit for (Owner of GDD_DamageSource) at Temp_Point facing Default building facing degrees
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Acid Bomb (Poison Arrows) to (Last created unit)
      • Unit - Set level of Acid Bomb (Poison Arrows) for (Last created unit) to (Level of Poison Arrows (Ranger) for GDD_DamageSource)
      • Unit - Order (Last created unit) to Neutral Alchemist - Acid Bomb (Triggering unit)
      • Custom script: call RemoveLocation( udg_Temp_Point )

Your trigger won't work. It shouldn't be Triggering unit, it should be GDD_DamagedUnit.
 

polo2005

Wana start playing LoL? http://tinyurl.com/369as27
Reaction score
97
here for melee range change if you still need
 

Attachments

  • change melee range.w3x
    16.7 KB · Views: 102

Bogrim

y hello thar
Reaction score
154
I don't know why else your trigger wouldn't work, Curo. Did you make sure your hero is using a missile attack?
Your trigger won't work. It shouldn't be Triggering unit, it should be GDD_DamagedUnit.
It does. :p Weep just didn't include triggering unit in the description.
 

Curo

Why am I still playing this game...?
Reaction score
109
I don't know why else your trigger wouldn't work, Curo. Did you make sure your hero is using a missile attack?
It does. :p Weep just didn't include triggering unit in the description.

He has a missile attack. The missile fires, so that works fine. It just doesn't apply a buff. It has nothing to do with the trigger.

To make it simple, from what I have seen, a poison/cold arrow fired via Orb of Lightning (new) will not apply a buff.

Perhaps you would like to test yourself to see if I am wrong, or it is just the mechanic.

@ polo2005: I'm not sure why you posted that.
 

polo2005

Wana start playing LoL? http://tinyurl.com/369as27
Reaction score
97
no idea why i psoted that, was kind of drunk when i did it... :p

However orb of lsow and lightning with turn on hit effect wont give you a buff, since its not firering the actually spell.

It creates a "glitch" that sends out an extra attack from your hero with on bonuses from the actually skill.

For example if you use searing arrows and sets extra damage to 546546546546546546546546, it iwll still deal the normal auto attack.
 

Curo

Why am I still playing this game...?
Reaction score
109
no idea why i psoted that, was kind of drunk when i did it... :p

However orb of lsow and lightning with turn on hit effect wont give you a buff, since its not firering the actually spell.

It creates a "glitch" that sends out an extra attack from your hero with on bonuses from the actually skill.

For example if you use searing arrows and sets extra damage to 546546546546546546546546, it iwll still deal the normal auto attack.

Thanks mate, that was the kind an answer I was looking for. Are you absolutely sure of this? Just making sure :)
 

polo2005

Wana start playing LoL? http://tinyurl.com/369as27
Reaction score
97
yup, atleast 99% sure, wich means i can still be wrong but, thats atleast the effect you get from the spell from own experiens
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top