Spell help! PLS!

blurished

Active Member
Reaction score
1
Skill (passive) - Deeper Bite

everytime it attacks the same target it is healed for 5xtimes attacked

example:

unit with deeper bite ATTACKS unit A,
it recover 5 hp
unit with deeper bite ATTACKS unit A again for the 2nd time,
it recovers 10 hp now

and so on...

but as soon as the unit changes target to unit B

it only recover 5 hp on the 1st atk, 10 hp on next n so on

the only problem i hv is how do i detect whether the attacked unit is the same unit?
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
do this
Trigger:
  • Initialization
    • Events
      • Map Initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set Ability_Hash = last created hashtable (hashtable variable)


Trigger:
  • Heal on attack
    • Events
      • A unit is attacked
    • Conditions
      • Boolean - Attacking unit has X ability is equal to true
    • Actions
      • Hashtable - Save real ([Hashtable load real (key of triggering unit) of (key of attacking unit) in Ability_Hash] + 5.00)
      • Unit - Set life of attacking unit equal to (life of attacking unit + [Hashtable load real (key of triggering unit) of (key of attacking unit) in Ability_Hash
      • If then else
        • If
          • Unit Comparison - Triggering unit is (hashtable load unit 1 of (key attacking unit) in Ability_Hash) is equal to false
        • Then
          • Clear Child Hashtable for (key [Hashtable load unit 1 of (key attacking unit) in Ability_Hash]) in Ability_Hash
          • Hashtable - Save Triggering unit as (key triggering unit) of (key attacking unit) in Ability_Hash
        • Else
 

blurished

Active Member
Reaction score
1
ive never used hashtables b4, i just finish searching n reading about it.....but which 1 from the drop down menu do i need..

Hashtable - Save ([Hashtable load integer (key of triggering unit) of (key of attacking unit) in Ability_Hash] + 5.00)

the others ive figured it out
 

keychup

Active Member
Reaction score
34
I used this method 2 years ago for a unit i wanted to raise the attackspeed of whenever it attacked the same unit. For you, this is what you should do.

1: Make a passive, no icon ability called (Count) with 5 levels
2: Make a passive ability from Slow Poison called (Deeper Bite), and change the buff to however you please.
3: Give these 2 abilities to the unit.
4: Trigger -
event, a unit is attacked
condition, level of Deeper Bite for attacking unit is Greater than 0
actions, If attacked unit has buff (Buff from Deeper Bite) is equal to true, then -set level of Count for attacking unit to level of Count for attacking unit + 1, -set life of attacking to unit to life of attacking unit + amount healed multipled by level of Count, else - set level of Count for attacking unit to 1, -set life of attacking to unit to life of attacking unit + amount healed multipled by level of Count.
 

wi3122

New Member
Reaction score
0
Trigger:
  • Your Trigger 1
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacked unit) has buff YourBuff ) Equal to True
    • Actions
      • Set YourTarget = (Attacked unit)
      • Unit - Set the custom value of YourTarget to (5 x (Level of Your Ability for YourUnit))
      • Unit - Set life of YourUnit to ((Life of YourUnit) + (Real((Custom value of YourTarget))))
      • Countdown Timer - Pause YourTimer
      • Set YourReal = 3.00
      • Countdown Timer - Start YourTimer as a One-shot timer that will expire in YourReal seconds



Trigger:
  • Your Trigger 2
    • Events
      • Time - YourTimer expires
    • Conditions
    • Actions
      • Unit - Set the custom value of YourTarget to 0
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
that wont work because it only resets after 3 seconds of not attacking, regardless of switching targets
 

Inflicted

Currently inactive
Reaction score
63
I would advise that a GDD system is used to detect the correct attack time. So that the ability is not abused. However that is rather complex compared to the simple suggestions provided above.

The link you used as your solution will work fine.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
my solution would only be abuse-able when a player spam-right clicked, and that could be stopped with a simple function that counts the number of times a unit attacks, lets say you get 5 times in a single second, then change a multiplier to 0 or -1 so it deals damage or doesnt heal at all if you abuse

you could counter this by setting their attack speed to slow normally, then test it with 200% haste, because that is more than likely an ammount that someone would average when playing an attack speed type hero like that
 
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