• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Invisibility that does not dispel on attack

Status
Not open for further replies.
Level 2
Joined
Jul 11, 2008
Messages
14
how do u make a hero ability which is invisibility not dispelling on attack?
 
Level 12
Joined
Mar 26, 2005
Messages
790
thats the worst effective method to do that with dummy

lets have a look at the ability named "Ghost", from Undead shade, that will do not dispell on attack

thats simple triger, unit begins cast a ability blabla,add Ghost ability to UNIT wait X seconds (or whatever) and remove Ghost ability from UNIT
 
Level 13
Joined
Jan 18, 2008
Messages
956
Open object editor. In the ability tab, select "Special", then "Units" and then the ability "permanent invisibility". There are 2 values set to 2.00 (Unit duration, hero duration), and set them to 0. This will give you permanent (even if you attack) invisibility.
If you want to make it a castable spell, use this trigger:
  • Invisible
    • Events
      • Unit - A unit ends the casting of a spell.
    • Conditions
      • (Ability being cast) equal to "Give Inivisibility"
    • Actions
      • Unit - Add "Permanent Invisibility" to (Target of ability being cast)
      • Wait - (Time you want the buff to be present)
      • Unit - Remove "Permanent Invisibility" from (Target of ability being cast)
If you want the buff to be permanent, ignore the last 2 lines. If you want the ability to be available from start, just add it in the object editor to the unit.
 
Level 13
Joined
Jan 18, 2008
Messages
956
Invisibility ability was tested before posting. And I don't think trigger could fail... so it should work. About comments like "Wouldn't work", please post WHY it wouldn't work. Constructive criticism, you know...
 
Level 2
Joined
Jul 11, 2008
Messages
14
i tried it, it works the first time you cast it, but doesnt seem to work after that :( i have no idea why this is happenin to meh :<
 
Level 6
Joined
Jul 25, 2005
Messages
221
The reason why it won't work the second time could be because Masiah suggested a TriggerSleepAction() which means its not MUI, which in turn means if you used your invisibility spell a second time within the buff duration it would've ignored the last action and started all over again, making your first unit permanently invisible.

And also, adding a wait time nulls all event responses (except GetTriggerUnit() ) so, before you use TriggerSleepAction() you should store your targeted unit in a variable.

To make it MUI you should use timers, which works better in my experience, and playing with variable arrays and timers equals MUI fun :cute:

If I haven't answered why it doesn't work the second time then I too am stumped. :confused:
 
This is a last resort, but use a periotic event to check for a buff, then add the buff in the ability Beserk. Then, pick every unit in the playable map area not in Invis_Group and add the ghost ability to the picked unit, and then add that unit to Invis_Group. Next, pick every unit in Invis_Group, check if the unit has your buff, and if it doesn't, remove the ghost ability from the unit and remove the unit from Invis_Group.
 
Level 13
Joined
Jul 3, 2008
Messages
1,098
i have got invis through immolation so unit is losing mana each second but you can base it on any other spell for example base it on bloodlust and remove all bonuses from it and then make trigger
event:
unit starts casting abbility
condition:
abbility being casted equal to permanent invis
action:
add ghost to targeted unit
set variable unitwithinvis=targeted unit

event:
every 1 second
action:
pick every unit in playable map area of type unitwithinvis
condition:
picked unit has got buff invis equal to false
then actions:
remove ghost from unitwithinvis
 
Status
Not open for further replies.
Top