Autocast problem

Skippy

Active Member
Reaction score
39
Hi,
I try to make an ability that adds some damage to every attack if it is set to auto-casting. However, it doesn't work :banghead:
I based it on Black Arrow ability and checked if damaged unit has some buff. But Black Arrow places buffs on damaged unit also if it isn't set to auto-cast (???). So I tried to base it on Cold Arrows. Now, it doesn't place buff at all.
What could be the problem? Is there any other way to check if I casted ability that is set to auto-cast?

Thanks.
 

Nenad

~Choco Coronet~ Omnomnom
Reaction score
137
Why didn't you just use fire/flame arrows from the Priestess of the Moon hero?
 

Skippy

Active Member
Reaction score
39
Searing Arrows? Because it doesn't place buff and I don't know a way to detect if I shoot fire arrows or normal arrows.
 

Skippy

Active Member
Reaction score
39
And one more information: I need to deal damage depending on hit points of attacked unit. Not constant damage (so I cant use just Searing Arrows).
 

avalya

New Member
Reaction score
37
Use cold arrows to place the buff, use a damage detection system, GDD is a good one, and when a unit takes damage and has the buff, then remove the buff and;

If,
GDD_DamagedUnit equal to PrimaryTarget
Then,
Else,
Set BonusDamage = 0
Set Primary Target = GDD_DamagedUnit

Set BonusDamage = BonusDamage + 5
Cause GDD_DamageSource to damage GDD_DamagedUnit dealing BonusDamage of damage type Chaos and attack type Universal

Should work the way you want it, if the target has the buff and is the same target as you previously attacked, then set the damage to previous damage + 5 (configure this to whatever) and deal pure damage equal to that number to the attacked unit.

If the target is not the unit that was attacked by the previous attack, then it will reset the damage.
 

Nenad

~Choco Coronet~ Omnomnom
Reaction score
137
All you have to do is detect when the unit is issued an order. If that order is ___on, it is being enabled. If it is ___off, it is being disabled. For example, healon is what happens when the unit turns autocast for the heal spell on. Not every spell has this possibility, however. Check the spell under Text - Order String - Activate and Text - Order String - Deactivate.

Taken from a post, 4-5 below yours, search the forums as well ^^
 

avalya

New Member
Reaction score
37
Cold Arrows does place a buff, how do you think it slows targets otherwise?
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
Cold Arrows is a bit strange in that it will apply the second specified buff by default. If you look at the default ability, its buffs are Cold Arrows (Non-stacking), Cold Arrows (Stacking), Cold Arrows (Info). If you leave the Data - Stack Flags value to default, the only buff it'll apply is Cold Arrows (Stacking), so change that one to the buff you want to use in your ability.

Then, using GDD, the trigger can be this simple (in this example I didn't change the buff):
Trigger:
  • Untitled Trigger 001
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
      • (GDD_DamagedUnit has buff Cold Arrows (Stacking)) Equal to True
    • Actions
      • Unit - Remove Cold Arrows (Stacking) buff from GDD_DamagedUnit
      • Unit - Cause GDD_DamageSource to damage GDD_DamagedUnit, dealing (0.10 x (Life of GDD_DamagedUnit)) damage of attack type Spells and damage type Normal
 

Skippy

Active Member
Reaction score
39
Thanks, I try it. Normal Cold arrows place buff but my custom arrows dont and I didnt know why.
 

avalya

New Member
Reaction score
37
Does it have 3 buffs, and not only one?

You need to add three buffs under the 'Buffs' field in the object editor, you might also be able to use the same all three times.
 

Skippy

Active Member
Reaction score
39
Yes, I used only one buff. I add another 2 and it works now. Thank you.
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top