• 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.

How to make invisible units to stay invisible when channeling/casting a spell?

Status
Not open for further replies.
Level 4
Joined
Aug 7, 2010
Messages
77
Hi all forum helpers. This may be a noobie question to some of you. Well, the situation goes like this, when an invisible unit cast a spell, its invisibility will be broken. So my question is, how to make permanent invisible units remains invisible when casting a spell such as the ghost in starcraft II where he stay invisible when launching a nuclear strike.

Thanks in advance!
 
Add Permanent Invisibility ability to your unit, just set Duration in both fields to 0. Your unit can channel/attack/cast spells and still be invisible. Rawcode of ability 'Apiv'.

You can add/ remove ability via:
JASS:
call UnitAddAbility (unit, 'Apiv')
call UnitRemoveAbility (unit, 'Apiv')
Just set variable unit to given unit you want to be permanently invisible.
 
Level 4
Joined
Aug 7, 2010
Messages
77
Add Permanent Invisibility ability to your unit, just set Duration in both fields to 0. Your unit can channel/attack/cast spells and still be invisible. Rawcode of ability 'Apiv'.

You can add/ remove ability via:
JASS:
call UnitAddAbility (unit, 'Apiv')
call UnitRemoveAbility (unit, 'Apiv')
Just set variable unit to given unit you want to be permanently invisible.

thanks alot! and sorry that i'm a noob.
 
@Svendviking you dont need jass at all.
You can either add permanent ability via object editor or (what enables you manipulating dynamicaly) add/remove it via trigger -> gives possibility to add invisibility as temporary buff, not as permanet skill. Like: your caster goes channel - you add invisibility; caster ends channeling - remove the sbility.

In GUI it's:
  • Unit - Add Yourability to (Triggering unit)
  • Unit - Remove Yourability to (Triggering unit)
Or for efficiency:
  • Custom script: call UnitAddAbility(udg_YourUnit, AbilitId)
  • Custom script: call UnitRemoveAbility(udg_YourUnit, AbilitId)
Ability Id you can get from Object Editor -> Ability section click Ctrl + D.
Rawdata (aka Id) of all abilityies will replace thier name field.
 
Status
Not open for further replies.
Top