- Joined
- Apr 6, 2012
- Messages
- 22
I originally posted this over on thehelper.net for help, but they don't seem to be replying over there so I thought I'd ask the awesome people over at THW for help instead. Here's the thread I posted there:
Eh. Feels like I'm asking too many questions which I should solve myself today, but I'm really confused about this one...
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.
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)