HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Some more Help plz

07-09-2010, 07:33 AM#1
PsiSan
Anyhow another 2 things quick:

1.) Making items stack when you pick them up (of the same type)

2.) I cant seem to get it right, that when a unit attacks it has a chance to to apply an ability on the attacked unit. (exp: i want to add slow poison with a % chance to do so)
07-09-2010, 08:42 AM#2
Tot
1) check all items an unit carries when it picks one. if it has alredy one of that type, add the charges of the picked item to the found item's charges and remove the picked item

2) unit attack events fire before the attack is launched, so it should work to check
- if the unit has the desired ability (level > 0) then
remove it
else
-if ramodmreal(0.0,1.0) less or equal than <your chance> (e.g 0.2 for 20%) if this expression is true, add the desired ability to the attacker
07-09-2010, 09:25 AM#3
Archmage Owenalacaster
Tot, that's silly; it fails entirely to account for the time between the launch of attack and the impact, whether ranged or melee. A damage-detection system is advised for such things.
07-09-2010, 10:41 AM#4
PsiSan
There is no attack event on my worldeditor, there is on "is attacked"
07-09-2010, 12:33 PM#5
Tot
Quote:
Originally Posted by PsiSan
There is no attack event on my worldeditor, there is on "is attacked"

that's what i ment

Quote:
Originally Posted by Archmage Owenalacaster
Tot, that's silly; it fails entirely to account for the time between the launch of attack and the impact, whether ranged or melee. A damage-detection system is advised for such things.

yea, but it should be sufficient...the best way would be to fully trigger it (without adding an ability...bu that's to much effort to do in GUI
07-09-2010, 12:40 PM#6
PsiSan
Lolz, my jass skill are shit?! maybe a gui example?
07-09-2010, 02:37 PM#7
Themerion
Actually, you might not need triggers for this at all...

Look up the Item Ability Orb of Slow. It applies a chance that an attack causes an ability to affect the attacked unit.