• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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,240
  • 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