"Chance on hit" Ability

salem

New Member
Reaction score
3
I've been trying to make a so called "Deep Wound" ability, where the hero has a 15% chance that his hit will do extra X damage and leave the target bleeding for 5 seconds (meaning target is losing hp during the 5 seconds that he's bleeding).

Now I'm trying to avoid the use of triggers, so I looked for an ability that will allow me to do what i described above. After searching through the massive war3 abilities, i landed on an item based one called "Item Attack Black Arrow Bonus". The special thing about this kind of ability, is that it gives a % chance that your hit will cause a certain effect:

Code:
Data - Chance To Hit Heroes (%)
Data - Chance To Hit Summons (%)
Data - Chance To Hit Units (%)
Data - Damage Bonus
Data - Effect Ability

So I based my hero ability off of this and made it a hero ability with 6 levels. Where it says "Data - Effect Ability", I placed my Deep Wound ability based off the Dryad's "Slow Poison". The "Chance To Hit" was set to 15% everywhere.

Now the problem is, it is always hitting and causing the Effect Ability "Deep Wound"... meaning as if the "Chance To Hit" was set to 100%.

I've also tried making 6 Deep Wound Abilities based off the "Item Attack Black Arrow Bonus", however, i kept them as item abilities and each one of them has its own "Deep Wound" Data - Effect Ability, which are also item abilities. Then i used triggers to give the hero the appropriate ability level... saddly it still doesn't work, for some reason the game directly gives the hero the Data - Effect Ability which completely ignores the Chance to Hit condition...
 
J

Jakadasnake

Guest
I think that's because the effect happens whether you hit the unit with the ability or not.
Honestly, I don't see a way to do this without triggers.
 

salem

New Member
Reaction score
3
Jakadasnake said:
I think that's because the effect happens whether you hit the unit with the ability or not.
Honestly, I don't see a way to do this without triggers.

I don't think so, if you take the item "Orb of Slow", it has the ability Orb of Slow which has a "Data - Effect Ability" Slow (Orb Version), and it's a chance on hit, meaning the effect won't happen everytime you hit, you have a chance on hit to slow your target.

Code:
Orb of Slow
Adds 6 bonus damage to the attack of a Hero when carried. The Hero's attacks also become ranged when attacking air, and have a chance to slow a target enemy unit's movement speed by 60% and attack rate by 25% for 60 seconds.
 

SFilip

Gone but not forgotten
Reaction score
634
base it of orb of lightning (new). it'll work then, confirmed.
 
B

bugi_bi

Guest
all orbs are similar, it will work with your Item Attack Black Arrow Bonus skill.
i tried it now. it works.
damage bonus is permanent but the effect has a chance to hit.
 

salem

New Member
Reaction score
3
bugi_bi said:
all orbs are similar, it will work with your Item Attack Black Arrow Bonus skill.
i tried it now. it works.
damage bonus is permanent but the effect has a chance to hit.

How did you make it work? Did you simply give the hero the "Item Attack Black Arrow Bonus" or did you make a new ability and a new Data - Effect Ability based on it?

SFilip, i'll try that right now
 
B

bugi_bi

Guest
salem said:
How did you make it work? Did you simply give the hero the "Item Attack Black Arrow Bonus" or did you make a new ability and a new Data - Effect Ability based on it?

i created new custom ability with base ability "Item Attack Black Arrow Bonus".
i gave her existing Shadow Strike(damages unit over time) as effect.
i removed shadow strike cooldown(you hafta do this or you will hafta wait for effect to cool down)
i set "Stats - Item ability = False" too, but that should not change any chance to hit data.
 

salem

New Member
Reaction score
3
bugi_bi said:
i created new custom ability with base ability "Item Attack Black Arrow Bonus".
i gave her existing Shadow Strike(damages unit over time) as effect.
i removed shadow strike cooldown(you hafta do this or you will hafta wait for effect to cool down)
i set "Stats - Item ability = False" too, but that should not change any chance to hit data.

the "Data - Chance To Hit" is set to what? cause by default it's 100%.
 
B

bugi_bi

Guest
salem said:
the "Data - Chance To Hit" is set to what? cause by default it's 100%.

-.-
i set all three fields of Chance To Hit to 50% and it works like 50%, sometimes effect is there sometimes is not.....btw mana cost of effect is also wasted.....i dont know if shadow strike damage per time stack (i doubt it) but still inital damage of shadow strike is there when attack succesfully hits.
 
S

Sang-C

Guest
- Create a dummy unit and make a passive skill based on poison attack for the dummy unit (6 levels) - make the dummy unit really small and set movement height to max and give it the invulnerable ability. IT MUST BE A HERO and REMOVE THE MINIMAP DISPLAY IN THE OBJECT EDITOR
- Set dummy unit's damage to close to zero
- Create a spell for your hero (DEEP WOUND) based on Bash (6 levels)
- Set the stun duration to 0.1 second (because 0 second may result in permanent stun)
- Create a buff for your dummy ability(change target art to blood animation) and Deep wound ability
- Add the buffs to the two abilities
- Create trigger as following

EVENT
- Unit is attacked

CONDITIONS
- Level of Deep Wound for attacking unit is 1*
- Buff for attacked unit is Deep wound equal to true (this is the key point)

ACTIONS
- Create 1 dummy unit for attacking unit in position of attacked unit
- Set last created unit = DUMMY UNIT (unit variable array)
- Set level of Poison attack for DUMMY UNIT to level 1*
- Issue order DUMMY UNIT to attack attacked unit
- Wait 0.5 second* (to make it more secure)
- Remove DUMMY UNIT from the game

NOW REPEAT THIS TRIGGER FOR LEVEL 2,3,4,5, and 6 - JUST SIMPLY CHANGE number 1 to another number in the trigger

HOPE THAT HELPS :shades:
 
S

somatic

Guest
just set the level of that posion attack to the level of your spell, and in the "- Set level of Poison attack for DUMMY UNIT to level X " where X is the current level of your skill obtain throught "Unit - Level of Ability of Unit".

Also just add 1 second generic timer to the last created unit, it works better than wait.
 

salem

New Member
Reaction score
3
thanks for the help guys, i got it to work using normal abilties, just like you guys said, I based my abilities on shadow strike and Orb of Lightning (new).
 
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