| 02-28-2009, 02:18 PM | #1 |
To be short: I want to do an ability that teleports the hero near an enemy and then deals damage to it, I've done everything, but the hero (during the action) can still receive orders from the player, so if a player is quick, can make him deal damage while running away. I tried to fix this by adding temporarily the locust ability to the hero, but it's not possible in the trigger editor. Suggestions? Maybe changing the ability to a channel ability could be better? (I guess no) How can I add to him the locust ability in spite of the fact that the trigger editor doesn't want me to use it? |
| 02-28-2009, 02:32 PM | #2 |
If you're using GUI, you'll need custom script. call UnitAddAbility(unit, 'Aloc') There you go. When you want it removed, just call call UnitRemoveAbility(unit, 'Aloc') |
| 02-28-2009, 02:42 PM | #3 | |
Quote:
Thanks, only one thing, the unit is an array variable: "SACaster[(Player number of (Owner of (Triggering Unit)))]", how should I write this? EDIT: Don't worry, found that thanks to the error log, + Rep incoming! |
| 02-28-2009, 04:08 PM | #4 |
It should also be one of the 'presets' in GUI if you are using NewGen |
| 02-28-2009, 04:13 PM | #5 | |
Quote:
Well, I'm not using it... Another problem right now, when the Locust ability is removed, the hero remains unselectable for the player. Suggestions? |
| 02-28-2009, 04:16 PM | #6 |
That's an unfortunate side effect of Locust. Refer to the Warcraft III Ability Guide (here @ wc3c) for far more detail about Locust. Perhaps adding/removing the Ward tag instead? |
| 02-28-2009, 04:23 PM | #7 |
Hide then Show the unit and locust will be gone... mostly |
| 02-28-2009, 04:31 PM | #8 | ||
Quote:
Didn't find the Ward tag, but I tried the "asleep" and "stun" tag, with no result... ![]() Quote:
Now the hero begins to wander after being unhidden, is that the "mostly" you are referring of? XD |
| 02-28-2009, 04:33 PM | #9 |
But can you select it and such? |
| 02-28-2009, 04:41 PM | #10 |
Yes, it works now, I only forgot to remove an "Issue Attack Order". Thanks to you all, + Thanks to The Kodo! |
