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

[Solved] cant figure out why this isnt working...

Status
Not open for further replies.
Level 2
Joined
Jul 2, 2013
Messages
12
Hi,Im trying to create a basick knockback skill that doesnt include player owned unit and any kind of structure regardless of who it belongs to.
this is my triger so far (the actual knockback system is in a folowing triger that has been checked and works fine,the moment I try to exclude above units the knockback triger <push> doesnt fire for some reason...)

  • int
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Mythic Gale
      • (Level of Mythic Gale for (Triggering unit)) Equal to 1
    • Actions
      • Set KnockAngle = (Position of (Triggering unit))
      • Set KncokTargetPoint = (Target point of ability being cast)
      • Unit Group - Pick every unit in (Units within 300.00 of (Target point of ability being cast)) and do (Actions)
        • Loop - Actions
          • Set temppick = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((temppick is A structure) Equal to True) or ((Owner of temppick) Equal to (Owner of (Triggering unit)))
            • Then - Actions
            • Else - Actions
              • Set KnockTarget = (Last created unit group)
              • Trigger - Turn on push <gen>
              • Wait 2.00 seconds
              • Trigger - Turn off push <gen>
the "knocktarget" is used in the next triger and is basicaly what determins of it works or not...

  • push
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in KnockTarget and do (Actions)
        • Loop - Actions
          • Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by 5.00 towards (Angle from KnockAngle to (Position of (Picked unit))) degrees)
 
Level 2
Joined
Jul 2, 2013
Messages
12
I think the setting of the variable itself isnt the problem since it worked in an earlier version where I didnt try to exclude specifc units...my guess is that for some reason it just doesnt create the group itself but I cant figure out why.. (of course I could be wrong...)

how would you suggest I set the variable then?
I tried this:
  • int
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Mythic Gale
      • (Level of Mythic Gale for (Triggering unit)) Equal to 1
    • Actions
      • Set KnockAngle = (Position of (Triggering unit))
      • Set KncokTargetPoint = (Target point of ability being cast)
      • Set KnockTarget = (Units within 300.00 of (Target point of ability being cast) matching ((((Matching unit) is A structure) Equal to False) or ((Owner of (Matching unit)) Not equal to (Owner of (Triggering unit)))))
      • Trigger - Turn on push <gen>
      • Wait 2.00 seconds
      • Trigger - Turn off push <gen>
but now it knocks back any unit regardless of class or owner...
 
Last edited:
Status
Not open for further replies.
Top