| 06-21-2004, 10:29 PM | #1 |
Does the add ability function only work with heroes? If so then that sucks. If not then why won't it add to a unit? I'm trying to make the d2 necromancer Iron Maiden ability but can't get it right because that stupid Add Ability won't work. I wanted to add spiked carpace (made it unit ability) to unit when it get attacked by another unit with the buff but it won't add. I also tried to create a unit with thorns aura when it is attacked but there is a delay for the aura (nothing can be done about it, it's how auras work) so that wouldn't work. I considered giving all units the spiked carapace ability with an upgrade to activate it but I don't like the extra icon there and upgrades apply to all units. I'm all out of ideas. Don't know any non-editor JASS functions or how to use them. |
| 06-21-2004, 10:49 PM | #2 |
The add ability action works on units as well, you are doing something incorrectly in your triggering. Revise or post the triggers up. |
| 06-21-2004, 10:58 PM | #3 |
:( It worked for my hero but every other unit didn't get the ability. |
| 06-21-2004, 11:18 PM | #4 |
heres what i would do: make a trigger so whenever a unit is attacked, and current learned level of 'Iron Maiden' = 1, then create 1 'Iron Maiderner level 1' unit (has locust ability, no model, no shadow, and deals like 30 dmg with an instant attack) for the owner of attacked unit and order last created unit to attack once attacking unit. (Give the Iron maidener 5 hp with -1 regen so it doesnt stick around forever) |
| 06-21-2004, 11:21 PM | #5 |
Try posting the trigger ? |
| 06-21-2004, 11:48 PM | #6 |
Iron Maiden Events Unit - A unit Is attacked Conditions ((Attacking unit) has buff Iron Maiden) Equal to True Actions Unit - Add Spiked Carapace to (Attacked unit) Wait 1.00 seconds Unit - Remove Spiked Carapace from (Attacked unit) Simple enough? I'm pretty sure the ability will get added before it takes the damage (works with mana shield). And 1 second is probably enough time for the unit to take damage but just in case i tried it without removing the ability but the unit never even got the ability. Only my hero got it. All other units got attacked too with an Iron Maidened unit. And I cannot use the other suggestion because I want the iron maiden damage to reflect the damage dealt or else i would have originally created a unit with no model and made it use storm bolt. |
| 06-21-2004, 11:56 PM | #7 |
hmmm your trigger looks correct, did you try it whit your hero and his summons only? ´ could it be abilities cant be added to summoned units? (well im not sure about this) |
| 06-22-2004, 12:58 PM | #8 |
lol, the hero got it probably because his model had the correct attachment points, the other units actually got it, but no effect was shown |
| 06-22-2004, 03:36 PM | #9 |
I fixed it. I have no idea what went wrong. I used a different ability, Spiked Shell, the unit one. Also, I took out the attachments so that you couldn't see that the unit was given that ability. |
| 06-22-2004, 04:04 PM | #10 |
I've played with these kind of triggers. I tried to give unit's crit strike whenever thay back stab a unit. The problem with that system is that the crit strike effect would only kick in at the 2nd attack (case in point, look at v0.4 of my Legionaries map). I found a better way to do it by creating a dummy unit to cast a buff spell on the unit. The buff spell comes into effect immediately. Thing is the only buff that I know of that causes returned damage is the thorns aura one but you can't cast that. I mean I know you already fixed it, but I'm just giving some extra info in case anyone is interested/knows more. |
| 06-23-2004, 04:57 AM | #11 |
If it's working on your hero but not regular units you probably forgot to make it into a unit ability. On your custom spiked carpace just make sure Stats- Hero Ability is set to false.... That's all I got. |
| 06-23-2004, 12:35 PM | #12 | |
Quote:
I don't know anything about D2 but shouldn't it be this?: Code:
((Attacked unit) has buff Iron Maiden) Equal to True Edit: Ohh sorry, read again and saw you were right, I'm really sorry! |
| 06-23-2004, 03:33 PM | #13 |
Maby you should add "If all condisions are true" stuff. Maby not. If not then i duno :> |
| 06-23-2004, 09:56 PM | #14 |
I already said i fixed it. In response to th15, I don't know about critical strike but what I'm trying to do actually works. When a unit is attacked, it takes a small amount of time before the damage is dealt. The ability gets added before the damage is dealt and it worked for manashieldoff/on orders and this thing. There is not buff that acts like a spiked shell. Thorns aura is an aura benefit and you only get the aura buff when you are within range of another unit with thorns, not a buff that can be easily added and removed. Buffs don't give you the ability, abilities do. Buffs only add special effects and time abilities. But the only problem is the timing of it and when to remove the ability. It's much more effective when giving an ability to an attacking unit than to an attacked unit because the attacking unit has a cooldown but the attacked unit can be attacked by 2 or 3 other units at the same time. I tried to use the vampiric potion ability with a negative value but for some reason I can't seem to give item abilities with no target that normally benefits a hero to a unit. Didn't try the vampiric attack yet. |
