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

[Trigger] Aoe Knockback

Status
Not open for further replies.
Level 2
Joined
Feb 18, 2009
Messages
3
Hello everybody, I need help again^^
I want to create a spell that effects all units within a range of 512 around the hero and damages them and knockbacks them back. The Damage works well but everything else is bugged. I tryied around many things but nothing helped. The funny thing is that Hero gets knockbacked and after that he disappears. I would be Happy if you could help me. Thank you for your Help.
This is my Trigger:

  • BlitzauraKnockback
    • Ereignisse
      • Unit - A unit Startet den Effekt einer Fähigkeit
    • Bedingungen
      • (Ability being cast) Gleich Blitzschock
    • Aktionen
      • Einheitengruppe - Pick every unit in (Units within 512.00 of (Position of (Casting unit))) and do (Actions)
        • Schleifen - Aktionen
          • If (((Picked unit) belongs to an ally of (Owner of (Casting unit))) Gleich False) then do (Einheit - Cause (Casting unit) to damage (Picked unit), dealing ((1.00 x (Real((Intelligenz of (Casting unit) (Einschließen bonuses))))) + 1.00) damage of attack type Zaubersprüche and damage type Magie) else do (Do nothing)
          • If (((Picked unit) belongs to an ally of (Owner of (Casting unit))) Gleich False) then do (Spezialeffekt - Create a special effect attached to the chest of (Casting unit) using Abilities\Spells\Orc\Purge\PurgeBuffTarget.mdl) else do (Do nothing)
          • Spezialeffekt - Destroy (Last created special effect)
      • Set Caster = (Triggering unit)
      • Set Target = (Picked unit)
      • Set Location = (Position of Caster)
      • Trigger - Turn on PushBlitzaura <gen>
      • Wait 1.00 seconds
      • Trigger - Turn off PushBlitzaura <gen>
      • Custom script: call RemoveUnit(udg_Caster)
      • Custom script: call RemoveUnit(udg_Target)
      • Custom script: call RemoveLocation(udg_Location)

  • PushBlitzaura
    • Ereignisse
      • Zeit - Every 0.04 seconds of game time
    • Bedingungen
    • Aktionen
      • Unit - Move Target instantly to (Location offset by ((Distance between Location and (Position of Target)) + 5.00) towards (Angle from Location to (Position of Target)) degrees)
      • Spezialeffekt - Create a special effect attached to the origin of Target using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
Jocky1992
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
There are several leaks, though you've tried to fix them...
I think a Unit Group is also a leak
(this hasn't got anything to do with the problem of course, I just noticed :p).
Also, if you pick all units within 512 of a position, that position will leak ^^
(at least, if the leak tutorials were right >.>)
Nothing serious though and it doesn't explain the problem...

I think the problem is that you set the variable wrong:
You set it to "picked unit", while the player group action is before that action,
so there are no units picked at that moment (just a guess :s).
 
Status
Not open for further replies.
Top