• 🏆 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!

Black/searing arrow detect and attribute stat stealing

Status
Not open for further replies.
Level 15
Joined
Jul 9, 2008
Messages
1,552
im trying to make a ability that will steal attribute from the attacked hero and deal extra damage depending on the heros intel but im having trouble detecting when the unit is using the ability.

im using Damage Engine 3.7.0.1

and currently this trigger (i know the damage is wrong and no atributes are being changed)
  • Esence attacks
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
      • (DamageEventTarget has buff essence (detect) ) Equal to True
      • (Level of Fel Essence for DamageEventSource) Greater than 0
    • Actions
      • Game - Display to (All players) the text: DAMAGE
      • Trigger - Turn off (This trigger)
      • Unit - Cause DamageEventSource to damage DamageEventTarget, dealing 500.00 damage of attack type Chaos and damage type Universal
      • Trigger - Turn on (This trigger)

the ability is based off black arrow with the duration set to 0.10 and summoned unit set to nothing(basicly just adds the buff)

the problem im having is this trigger isnt firing all the time it seams quite random on when it actually works. witch is where im lost i dont know whats wrong or how to find it since sometimes it does work.

also a few questions with the attribute edits
-ill be using the attribute ability to increase/decrease the stats giving it levels for the stacks and a indexing system for the effected units and duration of the stat drain. would a if then else for if the duration is up decrease the level and if its level 1 remove.and with the stacking to just increase its level be efficient.
-will i run into issues when removing/decreasing the attribute ability when the hero affected is dead?[/trigger]
 

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
You should remove the buff as first action. Duration does not matter.
I did a similar approach with frost arrow once, but any arrow that places a buff should work.
Are there any other triggers, that modify damage and could maybe prevent the damage event from firing?

It should be efficient and I doubt it would cause problems with dead heroes, but that's just what I assume.
 
Level 15
Joined
Jul 9, 2008
Messages
1,552
thanks

also thanks for letting me know about removing the buff with the trigger didnt think of that

i changed the base ability to frost arrows and it seems its buff is hardcoded
so i changed to cold arrow and it seams to be working perfect

i noticed black arrow wasnt applying to some units witch was probably causing this

thanks again + rep
 
Status
Not open for further replies.
Top