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

[Trigger] Problem with dummy units casting aoe buff

Status
Not open for further replies.
Level 6
Joined
Jan 2, 2015
Messages
171
I want my dummy to cast Mighty Guard ( Bloodlust) to units within 700 range from the caster. but it seems i can re-cast this Mighty Guard repeatly only when the last picked unit dont move from their position. Can someone help me correct my triggers? i use 2 ability which is Mighty Guard for caster and Mighty Guard Dumy for dumy unit.

  • AoE Mighty Guard
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Mighty Guard
    • Actions
      • Set AM_TempPoint = (Position of (Triggering unit))
      • Set AM_TempGroup = (Units within 700.00 of AM_TempPoint matching ((((Matching unit) belongs to an ally of (Owner of (Triggering unit))) Equal to True) and (((Matching unit) is A structure) Equal to False)))
      • Unit Group - Pick every unit in AM_TempGroup and do (Actions)
        • Loop - Actions
          • Unit - Create 1 dumy AM for (Owner of (Triggering unit)) at (Position of (Picked unit)) facing (Position of (Triggering unit))
          • Set Caster_Am = (Last created unit)
          • Unit - Add Mighty Guard Dumy to (Last created unit)
          • Unit - Order (Last created unit) to Orc Shaman - Bloodlust (Picked unit)
          • Unit - Remove (Last created unit) from the game
      • Custom script: call DestroyGroup(udg_AM_TempGroup)
      • Custom script: call RemoveLocation(udg_AM_TempPoint)
 
Level 25
Joined
May 11, 2007
Messages
4,651
You leak two positions here:
Unit - Create 1 dumy AM for (Owner of (Triggering unit)) at (Position of (Picked unit)) facing (Position of (Triggering unit))
Set Caster_Am = (Last created unit)

Not sure why you're saving Caster_Am and then not using it.
Delete this action:
Unit - Remove (Last created unit) from the game

and replace it with Add Timed Life (Water Elemental, 1 second) to last created unit
 
Status
Not open for further replies.
Top