| 06-18-2006, 05:20 AM | #1 |
This is what I want to do exactly. -When I cast an ability(Block) -My hero can not get hurt when attacked from front, and I want to also not be able to attack when blocking. Then I want to remove that ability when casted then add another ability that will turn off the block move. How will I do all this? |
| 06-18-2006, 06:02 AM | #2 |
The usual way to solve this is to trigger unit is damaged with an appropriate refund based on direction. To stop attacking you can issue stop or move orders when the unit tries to attack. The latter can probably also be accomplished with orbs. Give it a shot, if you get stuck, we can take a look. |
| 06-18-2006, 06:51 AM | #3 |
But, if you get hit by some lethal strike like 1500 dmg or something, you won't heal in time. |
| 06-18-2006, 07:11 AM | #4 |
If the damage is greater than your hp, then you have a backup ability which adds lots of extra hp temporarily so you can survive and then refund in the callback of a 0 duration timer. |
| 06-18-2006, 05:01 PM | #5 |
I don't think the damage source works, because I used a trigger like this and I still didn't gain life. Trigger: Damage SourceOn is the trigger for getting life back. Trigger: And I was also able to attack too. Trigger: What am I doing wrong? |
| 06-18-2006, 08:42 PM | #6 | |
Quote:
|
| 06-19-2006, 12:56 AM | #7 |
Ok I have figured some things out, but my footman keeps waving around his sword and he is able to attack sometimes. I was sitting there waving my sword around then my footman put damage on the enemy. So I don't want that. Is there a better way to disable attack? |
| 06-19-2006, 10:12 AM | #8 |
JASS:call UnitAddAbility(unit,'Abun') |
| 06-19-2006, 11:26 AM | #9 |
"Unit Takes damage" Does that Event exist? :o |
| 06-19-2006, 12:59 PM | #10 |
Yes, but only as a specific unit event. |
