• 🏆 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!
  • ✅ HD Level Design Contest #1 POLL is now OPEN! Check out the stunning visuals of the final entries. 🔗Click here to cast your vote!

[Trigger] Demolish Aura!

Status
Not open for further replies.
  • Trigger1
  • Events
    • Time - Every 1.00 second of game-time
  • Conditions
    • ((Your unit) is alive) Equal to True
  • Actions
    • Set Point1 = (Position of (Your unit))
    • Set Temp_Group = (Units within 500.00 of (Point1) matching (((Matching unir) belongs to an ally of (Owner of (Your unit)) Equal to True) and ((Matching unit) is a structure) Equal to False))
    • Unit Group - Pick up every unit in (Temp_Group) and do (Actions)
      • Loop - Actions
        • Unit - Add (Picked unit) to Temp_Group2
        • Unit - Add Demolish to (Picked unit)
    • Unit Group - Pick up every unit in (Temp_Group2) and do (Actions)
      • Loop - Actions
        • Set Point2 = (Position of (Picked unit))
        • If/Then/Else
          • If (Conditions)
            • (Distance between (Point1) and (Point2)) Greater than 500.00
          • Then (Actions)
            • Unit - Remove Demolish from (Picked unit)
            • Unit - Remove (Picked unit) from (Temp_Group2)
        • Custom script: call RemoveLocation (udg_Point2)
    • Custom script: call DestroyGroup (udg_Temp_Group)
    • Custom script: call RemoveLocation (udg_Point1)
 
Level 14
Joined
Jul 19, 2007
Messages
752
  • Trigger1
  • Events
    • Time - Every 1.00 second of game-time
  • Conditions
    • ((Your unit) is alive) Equal to True
  • Actions
    • Set Point1 = (Position of (Your unit))
    • Set Temp_Group = (Units within 500.00 of (Point1) matching (((Matching unir) belongs to an ally of (Owner of (Your unit)) Equal to True) and ((Matching unit) is a structure) Equal to False))
    • Unit Group - Pick up every unit in (Temp_Group) and do (Actions)
      • Loop - Actions
        • Unit - Add (Picked unit) to Temp_Group2
        • Unit - Add Demolish to (Picked unit)
    • Unit Group - Pick up every unit in (Temp_Group2) and do (Actions)
      • Loop - Actions
        • Set Point2 = (Position of (Picked unit))
        • If/Then/Else
          • If (Conditions)
            • (Distance between (Point1) and (Point2)) Greater than 500.00
          • Then (Actions)
            • Unit - Remove Demolish from (Picked unit)
            • Unit - Remove (Picked unit) from (Temp_Group2)
        • Custom script: call RemoveLocation (udg_Point2)
    • Custom script: call DestroyGroup (udg_Temp_Group)
    • Custom script: call RemoveLocation (udg_Point1)

Can you send the Variables too?
 
Level 12
Joined
Jul 27, 2008
Messages
1,181
Oh, for god's sake, why not have a buff, and give them the skill. Then set the level with the (jass :S) native.

  • Events
    • Every 0.3 seconds
  • Conditions
  • Actions
    • ----------TempGroup is a unit group ----------
    • Set TempGroup = Units in (Playable Map Area) matching ((Matching Unit) has buff BUFF)
    • Unit Group - Pick every unit in TempGroup and do
      • Loop - Actions
        • Unit Add Demolish to (Picked Unit)
        • Custom script: call SetUnitAbilityLevel(GetEnumUnit(),'A000',GetUnitAbilityLevel(GetEnumUnit(),'B000'))
Where 'A000' is the Demolish ability(with levels etc) and 'B000' the buff. (both rawcodes) .
 
Level 8
Joined
Mar 12, 2008
Messages
437
Oh, for god's sake, why not have a buff, and give them the skill. Then set the level with the (jass :S) native.

  • Events
    • Every 0.3 seconds
  • Conditions
  • Actions
    • ----------TempGroup is a unit group ----------
    • Set TempGroup = Units in (Playable Map Area) matching ((Matching Unit) has buff BUFF)
    • Unit Group - Pick every unit in TempGroup and do
      • Loop - Actions
        • Unit Add Demolish to (Picked Unit)
        • Custom script: call SetUnitAbilityLevel(GetEnumUnit(),'A000',GetUnitAbilityLevel(GetEnumUnit(),'B000'))
Where 'A000' is the Demolish ability(with levels etc) and 'B000' the buff. (both rawcodes) .

Yes, that's it. It's much easier and less buggy.

Btw, will GetUnitAbilityLevel really work on buffs?
 
Status
Not open for further replies.
Top