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

Adding an Ability to a Unit

Status
Not open for further replies.
Level 13
Joined
Mar 24, 2013
Messages
1,105
My question is how I can add an ability to a unit, yes, you use the Add ability trigger, but the problem is my ability is based off of defend/magic defense, the "Starts the effect of an ability" "Begins casting a spell" and similar events do not seem to proc the addition of the spell. Is there some other way to do this? (My only explanation is that Defend/Magic Defense is not considered a spell by the game, but I'm not sure)

Thanks in advance for any help!
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,259
They do not proc as no ability is cast. Passives are never cast and usually modify the base properties of the unit the ability is given to. This is why multi-level item health/mana bonus has a glitch that allows permanent modification of a unit's health. It is also why the Chaos ability has problems if a unit has used tomes or the described ability glitches to boost stats in the past as it only considerers default stats (why the Orc dude was so powerful in the campaign).

You may want to consider using StarCraft II as there all passive effects have been moved to a "behaviour" catalog. These come with their own natives to detect addition and loss. Just one of the many ways StarCraft II is superior to WarCraft III.
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
Defend and MagicDefense are toggle-able abilities. You cannot use "starts the effect of ability" etc., but you can use
  • Unit - A unit Is issued an order with no target
as an event and if you want to order that unit to use that ability, you use Issue Order with no target
  • Unit - Order (Triggering unit) to Human Footman - Defend
To find out what order unit has been issues, you have conditions -> Order comparison
 
Status
Not open for further replies.
Top