• 🏆 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!

Item Help

Status
Not open for further replies.
Level 5
Joined
Nov 29, 2007
Messages
106
I'v made an item that after use gives a shield that will absorb 400 magic damage to all allies in radius (Khadgar's Pipe of Insight (Dota Item)) but I don't know on which ability I should base.
 
Just use Channel with Target type set to No target (Instant). Then, pick every unit within 400 range of the hero's position, add them to a global group, save 400 (MaximumDamage) as a real via hashtable, and, whenever they receive magical damage, save MaximumDamage - DamageDealt. If the result is 0, then remove the unit from the global group, clear its hashtable values and destroy the trigger you created for it.
Best way would be jass, so that you can actually create one trigger per unit and then easily destroy it.
 
Oh ok, well, I found another way: Anti-magic shield.
Here:
  • Pipe
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Khadgar's Pipe of Insight
    • Actions
      • Set P_Points[1] = (Position of (Triggering unit))
      • Set P_TempGroup = (Units within 500.00 of P_Points[1] matching ((((Matching unit) is A Hero) Equal to True) and ((((Matching unit) belongs to an ally of (Owner of (Triggering unit))) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A str
      • Unit Group - Pick every unit in P_TempGroup and do (Actions)
        • Loop - Actions
          • Set P_Points[2] = (Position of (Picked unit))
          • Unit - Create 1 Footman for (Owner of (Picked unit)) at P_Points[2] facing Default building facing degrees
          • Unit - Hide (Last created unit)
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Pipe dummy ability to (Last created unit)
          • Unit - Order (Last created unit) to Undead Banshee - Anti-magic Shell (Picked unit)
          • Custom script: call RemoveLocation (udg_P_Points[2])
      • Custom script: call DestroyGroup (udg_P_TempGroup)
      • Custom script: call RemoveLocation (udg_P_Points[1])
 

Attachments

  • Khadgar's Pipe of Insight.w3x
    19.5 KB · Views: 73
Level 33
Joined
Mar 27, 2008
Messages
8,035
Ok here's another quick question:

  • Untitled Trigger 001
    • Action
      • Unit - bla bla bla
      • Unit - blo blo blo
      • Unit - ble ble ble
  • Untitled Trigger 002
    • Action
      • Unit - bla
      • Unit - and bla
Does this 2 trigger ends at the same speed ?
My true question is: Does more action requires a longer time for the system to read OR does the action triggered SIMULTANEOUSLY ?
Thank you ;D
 
Status
Not open for further replies.
Top