- Joined
- Sep 12, 2008
- Messages
- 657
hey.. im trying to do a code for a request that does a circle of units.. (mui)
i've made most of it.. knockback's done, everything..
but i want it to follow the unit aswell..
the way i created it fails, cuz i dont know the exact count (i move them in a unit group, when i created it was a loop)
so i tried this
well.. my real problem is this:
the created dummies start going mad,
they go forward and forward,
then theres a weird line in minimap, (like when you get vision of a line)
then it crushes the game..
any idea? o.o
i've made most of it.. knockback's done, everything..
but i want it to follow the unit aswell..
the way i created it fails, cuz i dont know the exact count (i move them in a unit group, when i created it was a loop)
so i tried this
-
Custom script: local real x
-
Custom script: local real y
-
Set EnergyField_Count[EnergyField_Index[4]] = (EnergyField_Count[EnergyField_Index[4]] + 1)
-
Custom script: set udg_EnergyField_Angle = ((360 / udg_EnergyField_AmountOfDummies[udg_EnergyField_Index[4]]) * udg_EnergyField_Count[udg_EnergyField_Index[4]]) * bj_DEGTORAD
-
Custom script: set x = GetUnitX(GetEnumUnit()) + udg_EnergyField_DistanceFromTarget * Cos (udg_EnergyField_Angle)
-
Custom script: set y = GetUnitY(GetEnumUnit()) + udg_EnergyField_DistanceFromTarget * Sin (udg_EnergyField_Angle)
-
Custom script: call SetUnitX(GetEnumUnit(), x)
-
Custom script: call SetUnitY(GetEnumUnit(), y)
-
Set EnergyField_Count[EnergyField_Index[4]] = 0
well.. my real problem is this:
the created dummies start going mad,
they go forward and forward,
then theres a weird line in minimap, (like when you get vision of a line)
then it crushes the game..
any idea? o.o