• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

AoE purge

Status
Not open for further replies.
Level 15
Joined
Oct 29, 2012
Messages
1,474
Please Tell me If I missed something Because I'm the Leaks Lord (Not Always)
  • Purge
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to AOE Purge
    • Actions
      • Set Unit[1] = (Triggering unit)
      • Set Point[1] = (Position of Unit[1])
      • Set EnemiesGroup[1] = (Units within 350.00 of Point[1] matching (((Matching unit) belongs to an enemy of (Owner of Unit[1])) Equal to True))
      • -------- This is using Unit Groups --------
      • Unit Group - Pick every unit in EnemiesGroup[(Player number of (Triggering player))] and do (Actions)
        • Loop - Actions
          • Unit - Cause Unit[1] to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
      • -------- This isn't --------
      • Unit - Cause Unit[1] to damage circular area after 0.00 seconds of radius 350.00 at Point[1], dealing 500.00 damage of attack type Spells and damage type Normal
      • Set Unit[1] = No Unit
      • Custom script: call RemoveLocation(udg_Point[1])
      • Custom script: call DestroyGroup(udg_EnemiesGroup[1])
 

Kusanagi Kuro

Hosted Project: SC
Level 10
Joined
Mar 11, 2012
Messages
708
Hmm. I think what he needs is a Purge spell cast on all unit within the area. If that is the case, then here is the trigger:
  • Purge
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to AOE Purge
    • Actions
      • Set tempU = (Triggering unit)
      • Set tempPoint = (Position of tempU)
      • Set AffectedGroup = (Units within (Your AOE here) of tempPoint matching (((Matching unit) belongs to an enemy of (Owner of tempU)) Equal to True))
      • Unit Group - Pick every unit in AffectedGroup and do (Actions)
        • Loop - Actions
          • Set tempPoint2 = (Position of (Picked Unit))
          • Unit - Create 1 Dummy for (Owner of (tempU)) at (tempPoint2) facing (tempPoint2)
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Purge to (Last created unit)
          • Unit - Order (Last created unit) to Orc Shaman - Purge (Picked unit)
          • Custom script: call RemoveLocation(udg_tempPoint2)
      • Custom script: call RemoveLocation(udg_tempPoint)
      • Custom script: call DestroyGroup(udg_AffectedGroup)
Since your spell is instant effect, u dont need to use Arrays Variables.
Also, if u want to use array variable, I suggest u should have Unit Indexer to make every unit's custom value and use them as the value of ur arrays (hope I explain it clear enough to understand ==).
 
Status
Not open for further replies.
Top