• 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.
  • Vote for the theme of Hive's HD Modeling Contest #7! Click here to vote! - Please only vote if you plan on participating❗️

How to disable unit's abilities and building

Status
Not open for further replies.
Level 10
Joined
Jun 6, 2007
Messages
392
I'm making a modified (triggered) version of animate dead, and I need to simulate the original spell as well as possible. I'm almost done, the units are summoned, recolored and so on, but I still have one problem. How do I disable all abilities for summoned units, including building?
 
You could have a dummy unit cast a silence ability on them (base it on Soul Burn), but I'm not sure if this will disable building.

Alternatively, add the Ward classification to these units, as this hides all buttons on the unit's command card, which makes all abilities impossible to cast. They'll keep their passive abilities, and you'll probably have to edit a lot of your spells to target wards as well.

The last option is to catch any orders given to these units, and if it isn't {smart | attack | attackground | patrol | stop | holdposition}, order it to stop.
 
Level 23
Joined
Feb 6, 2014
Messages
2,466
There is no action that alliws you to Remove all abilities of units/buildings as far as i know. Work arounds I can think of are:
1. Instead of recreating the dead unit, create an illusion of it with 100% dmg and takes 100% dmg. That way, it cannot use abilities.
2. Store all unit types' possible abilities into a hashtable so you can directly know what are the abilities a unit has allowing you to remove thoaese abilities via Unit - Remove Ability.
3. Make it's mana zero with very high negative mana regen or silence the ressurected unit forever.

EDIT: Ohh, someone already suggested the silencing part.
 
Status
Not open for further replies.
Top