Not sure why this doesn't work

Versae

New Member
Reaction score
0
Eh. Feels like I'm asking too many questions which I should solve myself today, but I'm really confused about this one...

Trigger:
  • Events
    • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Earth Slam
    • Actions
      • Set Temp_Point = (Position of (Triggering Unit))
      • Set Temp_Group = (Units within (100+(100x(Real((Level of (Ability being cast) for (Triggering Unit)))))) of Temp_Point matching (((Matching unit) belongs to an enemy of (Owner of (Triggering Unit))) Equal to True))
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Set Ability_Arees2Earth_TargPos = (Position of (Picked Unit))
          • Unit - Move (Picked unit) instantly to (Temp_Point offset by (100x(Real((Level of (Ability being cast) for (Triggering Unit))))) towards (Angle from Temp_Point to Ability_Arees2Earth_TargPos) degrees)
          • Custom script - call RemoveLocation(udg_Ability_Arees2Earth_TargPos)
        • Custom script - call RemoveLocation(udg_Temp_Point)
        • Custom script - call DestroyGroup(udg_Temp_Group)


It's supposed to select every unit in a 200/300/400/500 area (depending on ability level) around the caster and push each one away from the caster by 100/200/300/400 units (depending on ability level), but it seems to only affect one unit in that area and instead of pushing it away, it pulls it towards the caster... Really weird.
 

death_knight

Dark is the heart of a corrupted man.
Reaction score
24
I might be wrong, but I think its because the "Custom script - call RemoveLocation(udg_Temp_Point)" and the "Custom script - call DestroyGroup(udg_Temp_Group)" actions are in the unit group loop instead of after it.
 

dracolich

TH.net Regular
Reaction score
15
Angle from Temp_Point to Ability_Arees2Earth_TargPos
you should use REVERSE value
 

Amn

Member
Reaction score
18
you are destroying the location udg_Ability_Arees2Earth_TargPos
so it only works once. comment that line and try again.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top