• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

I am having an issue with this spell

Status
Not open for further replies.
Level 4
Joined
Aug 17, 2014
Messages
102
1bc3b1a8264abf54b8501670377f3bab.png

1bc3b1a8264abf54b8501670377f3bab.png

2300879c826209a4200d1de5506ec308.png



I am simply creating a spell where an archer can rotate between different elemental arrows. For some reason the gui [Ability - Set Ability Real Level Field] may not be working properly or I am doing something wrong. Here is what im working with: I am using [Item Attack Fire Bonus] as a hidden passive to increase the units attack-damage equal to its agility, I want it to refresh consistently in case the user gains agility from a buff or item. From my understanding from what the code reads it should update the [Bonus Damage] part of the spell every time he attacks to equal this units agility.
 
Last edited:

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,197
That ability might not support having its values updated.

Have you tried using actual arrows like Searing Arrow and modifying the bonus damage of that ability?

Otherwise you might need to use a DDS system and detect when the unit deals auto attack damage and then modify the damage amount. DDS systems updated for 1.31 will use the new natives to efficiently perform such modifications.
 
Level 4
Joined
Aug 17, 2014
Messages
102
Yeah, I just tried changing it to Searing Arrows and it did not work. Is that ever intended to function properly? It would be a shame if it never will. That genuinely would make my life so much easier. And how would I go about using a DDS system to make such a spell?
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,197
Make sure you are setting the correct field for the ability. Just because the name is similar does not mean that it will work (check exact names, I am not saying you choose the wrong one as I have not checked).

It does work with some abilities. However maybe only with damaging abilities like Blizzard and not with attack modification ones. With JASS the function returns false if the modification failed and can be used to confirm if a field can be modified.
And how would I go about using a DDS system to make such a spell?
There must be posts discussing this somewhere. Triggered arrow abilities are a common request.

The basics is that you use the damage detection system to detect when the unit is damage. If this damage is an attack (not ability) then modify the damage dealt to reflect the damage bonus. Detecting if the damage is from an attack or ability should be part of the Damage Detection System. If you want just the bonus damage to be a different type then one will need to deal the bonus damage as a separate damage instance.
 
Level 4
Joined
Aug 17, 2014
Messages
102
@Dr Super Good so I downloaded the damage engine by bribe but after a couple attempts at making something I genuinely don't seem to understand it. Do you think if possible you of anyone can show me how it's done using the damage engine I think once I see it done I can reverse engineer it and understand it.


The original spell is this:
Q: Elemental Arrows: Toggle: Rotate through your arrows. (CD 2 seconds)
Fire Arrows: Your attacks deal a bonus (1 x Agility) damage, but consume 5 energy per shot.
Nature Arrows: Your attacks leave a dot which deals (3 x Agility) damage over 3 seconds, but they consume 3 energy per shot.
Ice Arrows: Your attacks slow the target down by 20% for 2 seconds, but they consume 5 energy per shot.
Lightning Arrows: Your attack regenerate 10 energy per shot.
I pretty much think I have everything down except the Fire arrow damage psrt, the way I had done it before it would apply damage even if the animation was canceled and that's no good. But if I can understand how to do that with bribes engine j think I can make the lightning and nature ones work as well
 
Level 4
Joined
Aug 17, 2014
Messages
102
Make sure you are setting the correct field for the ability. Just because the name is similar does not mean that it will work (check exact names, I am not saying you choose the wrong one as I have not checked).

It does work with some abilities. However maybe only with damaging abilities like Blizzard and not with attack modification ones. With JASS the function returns false if the modification failed and can be used to confirm if a field can be modified.

There must be posts discussing this somewhere. Triggered arrow abilities are a common request.

The basics is that you use the damage detection system to detect when the unit is damage. If this damage is an attack (not ability) then modify the damage dealt to reflect the damage bonus. Detecting if the damage is from an attack or ability should be part of the Damage Detection System. If you want just the bonus damage to be a different type then one will need to deal the bonus damage as a separate damage instance.
I figured out how to do that first part thanks
 
Status
Not open for further replies.
Top