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

Simple Trigger Question

Status
Not open for further replies.
Level 4
Joined
Apr 24, 2009
Messages
115
How do I make it so that an item ability can't be cast on a player's own units?
Also, can I exclude specific non-building units from being targets?


Thanks in advance for any help :)
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
  • Untitled Trigger 090
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Finger of Death (item)
      • Or - Any (Conditions) are true
        • Conditions
          • ((Target unit of ability being cast) belongs to an enemy of (Triggering player)) Equal to False
          • (Unit-type of (Target unit of ability being cast)) Equal to Ghoul
    • Actions
      • Unit - Pause (Triggering unit)
      • Custom script: call SetUnitPosition(GetTriggerUnit(), GetUnitX(GetTriggerUnit()), GetUnitY(GetTriggerUnit()))
      • Unit - Unpause (Triggering unit)
That will still trigger the cooldown though. Add unit types that the ability can't be cast on. Remember to edit targets allowed of the ability. Uncheck allies, friend, enemy and neutral.
 
Level 4
Joined
Apr 24, 2009
Messages
115
  • Untitled Trigger 090
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Finger of Death (item)
      • Or - Any (Conditions) are true
        • Conditions
          • ((Target unit of ability being cast) belongs to an enemy of (Triggering player)) Equal to False
          • (Unit-type of (Target unit of ability being cast)) Equal to Ghoul
    • Actions
      • Unit - Pause (Triggering unit)
      • Custom script: call SetUnitPosition(GetTriggerUnit(), GetUnitX(GetTriggerUnit()), GetUnitY(GetTriggerUnit()))
      • Unit - Unpause (Triggering unit)
That will still trigger the cooldown though. Add unit types that the ability can't be cast on. Remember to edit targets allowed of the ability. Uncheck allies, friend, enemy and neutral.

Thanks, I'll play around with it
 
Status
Not open for further replies.
Top