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

Item Related

Status
Not open for further replies.
Level 8
Joined
Mar 26, 2009
Messages
301
1-) I have system based on "Unit is attacked" event. It does not trigger the actions since items are not "units"; any short way to fix this?
2-) To fix the problem in easier manner; how does one make items invulnerable? I remember seeing invulnerable items in some maps but I can't seem to find out how to do it by myself.
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
There is Item - make vulnerable in GUI.

You can detect when a unit is ordered to attack an item. But that may not work for your purposes.

  • Untitled Trigger 057
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Issued order) Equal to (Order(attack))
      • (Target item of issued order) Not equal to No item
    • Actions
      • Game - Display to Player Group - Player 1 (Red) the text: Item attacked
 
Level 8
Joined
Mar 26, 2009
Messages
301
There is Item - make vulnerable in GUI.

You can detect when a unit is ordered to attack an item. But that may not work for your purposes.

  • Untitled Trigger 057
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Issued order) Equal to (Order(attack))
      • (Target item of issued order) Not equal to No item
    • Actions
      • Game - Display to Player Group - Player 1 (Red) the text: Item attacked
That supposed to work but It does not. The trigger is:
  • Events
    • Unit - A unit Is issued an order targeting an object
  • Conditions
    • (Issued order) Equal to (Order(attack))
    • (Item-type of (Target item of issued order)) Equal to 7.62mm
  • Actions
    • Unit - Order (Triggering unit) to Stop
But units are still able to attack and destroy the item(s).
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
You need to add a dealy before the stop order

  • Untitled Trigger 057
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Issued order) Equal to (Order(attack))
      • (Target item of issued order) ...
    • Actions
      • Countdown Timer - Start Timer1 as a One-shot timer that will expire in 0.00 seconds
      • Unit Group - Add (Triggering unit) to group
  • Untitled Trigger 039
    • Events
      • Time - Timer1 expires
    • Conditions
    • Actions
      • Unit Group - Pick every unit in group and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Stop
          • Unit Group - Remove (Picked unit) from group
 
Level 8
Joined
Mar 26, 2009
Messages
301
I am not sure that I understand your system =) So I did this:
Indestructable Items
  • Events
    • Unit - A unit Is issued an order targeting an object
  • Conditions
    • (Issued order) Equal to (Order(attack))
    • (Target item of issued order) Not equal to No item
  • Actions
    • Unit - Create 1 Classic Dummy for (Owner of (Ordered unit)) at (Position of (Ordered unit)) facing (Facing of (Ordered unit)) degrees
    • Unit - Add Stop Attack (briefly) to (Last created unit)
    • Unit - Set level of Stop Attack (briefly) for (Last created unit) to 1
    • Unit - Order (Last created unit) to Neutral Dark Ranger - Silence (Position of (Ordered unit))
"Stop Attack" is a silence spell with 10 AOE (only targetable on friendlies) which blocks attack for 0.01 secods =) Works flawlesly for now.
Thanks for your help.
 
Status
Not open for further replies.
Top