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

Ability Classes

Status
Not open for further replies.
Level 8
Joined
Apr 30, 2009
Messages
338
Is there a way to set/check abilities into "Classes" like you can with items (Powerup, Charged etc).

Certain spells will be classified as Curses, Blessings, Heals, and Nukes and will do different things based on the buffs on their targets.

I would like to classify the abilities in my map somehow and I don't like making a million arrays at initialization, so I can run triggers like this:

E
A unit begins the effect of an ability

C
Ability being cast is a Curse
Target unit has buff "Curses own me"

A
Cause triggering unit to damage targeted unit 8493758345 attack type hero damage type magic
 
Level 8
Joined
Aug 1, 2008
Messages
420
Well... spells do dmg depending on the spell damage type and the targets armor type right? So just make peoples armor have weak damage against magic, then make the Curse spell magic.
And then same for say, fire spells. Make fire spells deal a different kind of damage, that owns over a different armor type. See what im saying?
 
Level 8
Joined
Aug 1, 2008
Messages
420
Well all i can think of...

  • Untitled Trigger 001
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacked unit) has buff Acid Bomb) Equal to True
      • ((Attacked unit) has buff Slow) Equal to False
    • Actions
      • Set AttackedUnit = (Attacked unit)
      • Set AttackingUnit = (Attacking unit)
      • Set AttackedUnitPos = (Position of AttackedUnit)
      • Unit - Create 1 Footman for (Owner of AttackingUnit) at AttackedUnitPos facing (Position of AttackedUnit)
      • Set Dummy = (Last created unit)
      • Unit - Order Dummy to Human Sorceress - Slow AttackedUnit
      • Wait 0.30 seconds
      • Unit - Remove Dummy from the game
      • Custom script: call RemoveLocation(udg_AttackedUnitPos)
This makes a dummy cast slow on the attacked unit, if he has curse... It needs the wait or he wont cast the spell and will be removed instantly... They wont be slowed if they are already slowed, to prevent it from spamming slow... but you can change that.

This is the only way i can think of, and probably the least effective way.. someone else will have to help you.
 
Status
Not open for further replies.
Top