| 09-26-2006, 10:36 PM | #1 |
Is there an easy way to make a unit get Faerie Fire (or another spell that makes the unit unable to go invisible) when it picks up an item? And as a bonus, is it possible to make it un-dispellable? In short, is it possible to make a unit get Faerie Fire, aslong as it is holding a specific item? Like a passive ability that makes the unit unable to go invisible. |
| 09-27-2006, 12:07 AM | #2 |
I'm not with my World Editor available right now, so I'm not going to be able to give you specific trigger names...nonetheless, here's what you should do :) 1) Create a Dummy Unit (With "Locust Spell", size 100, shade size 0, invisible). 2) Create a spell based off "Faerie Fire" (Let's name it "Unvis." for now). Set its armor reduction to 0, and set its duration to 0. Make it able to affect Allied Units. Make its techtree and mana requirements to 0 and make it a 0 cooldown spell. 3) There's an Event, I believe, that's similar to "Unit Picks Up an Item"; set the Condition equal to "Item being manipulated equal to (Uninvisibility Blade). Finally, in Actions: Create 1 DummyUnit for (Owner of Triggering Unit) at position of (Triggering Unit) Unit - Give (Last Created Unit) spell (Unvis.) Unit - Set Generic Expiration Timer of (Last Created Unit) to (1-2 seconds) Order (Last Created Unit) to cast "Uninvis." on (Triggering Unit) I'm not sure about the names of the Events / Conditions / Actions, but I think they're pretty similar to those I wrote. Basically, when X unit picks up the item, it will gain an infinite Faerie Fire effect. I'm not sure how to make it undispellable; I think there's a trigger that detects whenever a unit loses a buff. You can use that to detect if the unit whose buff is dispelling is currently holding the item that makes it unable to make it invisible; if so, recast the "Unvis." spell on them. Hope this helps :) |
| 09-27-2006, 12:12 AM | #3 |
The buff can still be dispelled or get removed on death. Best solution i see is to keep the buff on the unit with a periodic event, if the unit has the item but not the buff, apply the buff like Omega-Prime said. |
| 09-27-2006, 03:13 PM | #4 |
Dumb solution. Have you ever heared of JASS:call UnitShareVision takes unit whichUnit, player whichPlayer, boolean share returns nothing Just loop through integer i from 0->11 and enable it, create 2nd trigger that detects whenever you drop your item and siable again. Note: This gets far more complicated, when you allready have a system that modifies the sight of units, this would screw it up. |
| 09-27-2006, 04:18 PM | #5 |
Too bad that function doesnt do anything to invisiblity. You will be able to see what the unit sees, but you will not be able to see the unit. |
| 09-28-2006, 02:25 PM | #6 |
If the map uses spells that make the guy invivsible, juts detect whenever one of that spells is cast and the target is Your "special" guy and loop (where you move the dummy unit) until he is visible again(remove the unit). |
| 09-28-2006, 02:33 PM | #7 |
As for the periodic timer faery firee, make sure not to have any memory leak in the dummy unit casting. I think that autocast dispel abilities will be a serious problem there, not really for keeping the buff but players would complain about the waste of mana and cooldown |
