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!
I moved a unit using SetUnitPosition and check a group of units near him. Everything works. After that I changed SetUnitPosition to SetUnitX and Y. It doesn't work now. What should I do?
Moving Dummy unit checks the same dummys.
If unit doesnt have movement speed, he doesnt move correctly, right?
I set it to 100 and he moves, but unit group doesnt check.
Try to help please, I havent English editor to post triggers=(
as long as you're checking the right x,y it should work... my missile system (very old and not so good) uses SetUnit X/Y and it works when I added a method that checks if there's other missiles in range for example...
which is why we need to see the triggers that you're using...
as long as you're checking the right x,y it should work... my missile system (very old and not so good) uses SetUnit X/Y and it works when I added a method that checks if there's other missiles in range for example...
which is why we need to see the triggers that you're using...
I check it after SetUnitX. Is it so necessary?
I have tried to set unit group from Units location and tried to use coordinates. The results are the same.
Btw:
Hmm.. I understand that when I used 0 MS, it checks everything but when I change that to 1 MS, the group doesnt check. Sure that this is not problem of function, this is problem of MS.
(Number of units in ENG_group) не равно (!=) 0
ДейÑтвиÑ
ОтрÑд - Pick every unit in ENG_group and do (Actions)
Цикл - ДейÑтвиÑ
Custom script: set udg_ENG_key = GetHandleId(GetEnumUnit())
Set ENG_SpeedFactor = (Load (Key SpeedFactor) of ENG_key from ENG_hash)
Ð‘Ð¾ÐµÐ²Ð°Ñ ÐµÐ´Ð¸Ð½Ð¸Ñ†Ð° - Turn collision for (Picked unit) Откл.
Set TempUnit = (Picked unit)
Set ENG_RA = (Facing of (Picked unit))
Set ENG_size = (Load (Key Size) of ENG_key from ENG_hash)
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
ЕÑли - УÑловиÑ
ENG_SpeedFactor больше (>) 0.00
То - ДейÑтвиÑ
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
ЕÑли - УÑловиÑ
ENG_IsSlow равно (==) Да
То - ДейÑтвиÑ
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
ЕÑли - УÑловиÑ
ENG_SpeedFactor больше (>) ENG_StopFactor
То - ДейÑтвиÑ
Ð¥Ñш-таблица - Save (((ENG_SpeedFactor / (1.00 + ENG_SlowLiquidFactor)) - (ENG_SlowFactor x ENG_g)) x 1.00) as (Key SpeedFactor) of ENG_key in ENG_hash
Иначе - ДейÑтвиÑ
Ð¥Ñш-таблица - Save 0.00 as (Key SpeedFactor) of ENG_key in ENG_hash
ÐÐ½Ð¸Ð¼Ð°Ñ†Ð¸Ñ - Change (Picked unit)'s animation speed to 0.00% of its original speed
Иначе - ДейÑтвиÑ
Custom script: set udg_ENG_x = GetUnitX(GetEnumUnit())
Custom script: set udg_ENG_y = GetUnitY(GetEnumUnit())
Custom script: set udg_ENG_xn = udg_ENG_x + udg_ENG_InershionFactor*udg_ENG_SpeedFactor*Cos(udg_ENG_RA*bj_DEGTORAD)
Custom script: set udg_ENG_yn = udg_ENG_y + udg_ENG_InershionFactor*udg_ENG_SpeedFactor*Sin(udg_ENG_RA*bj_DEGTORAD)
Set CP_Point = (Point(ENG_xn, ENG_yn))
Триггер - Run Check Walkability <gen> (ignoring conditions)
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
ЕÑли - УÑловиÑ
CP_PointIsWalkable равно (==) Ðет
ENG_IsWallBounce равно (==) Да
То - ДейÑтвиÑ
Set TempPoint = (Position of TempUnit)
Set ENG_dx = (ENG_SpeedFactor x ENG_BounceKoefficient)
Set ENG_dy = ENG_dx
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
ЕÑли - УÑловиÑ
ENG_RA больше или равно (>=) 0.00
ENG_RA меньше или равно (<=) 90.00
То - ДейÑтвиÑ
Custom script: set udg_ENG_xo = udg_ENG_x + udg_ENG_dx
Custom script: set udg_ENG_yo = udg_ENG_y + udg_ENG_dy
Иначе - ДейÑтвиÑ
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
ЕÑли - УÑловиÑ
ENG_RA больше (>) 90.00
ENG_RA меньше или равно (<=) 180.00
То - ДейÑтвиÑ
Custom script: set udg_ENG_xo = udg_ENG_x - udg_ENG_dx
Custom script: set udg_ENG_yo = udg_ENG_y + udg_ENG_dy
Иначе - ДейÑтвиÑ
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
ЕÑли - УÑловиÑ
ENG_RA больше (>) 180.00
ENG_RA меньше или равно (<=) 270.00
То - ДейÑтвиÑ
Custom script: set udg_ENG_xo = udg_ENG_x - udg_ENG_dx
Custom script: set udg_ENG_yo = udg_ENG_y - udg_ENG_dy
Иначе - ДейÑтвиÑ
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
ЕÑли - УÑловиÑ
ENG_RA больше (>) 270.00
ENG_RA меньше или равно (<=) 360.00
То - ДейÑтвиÑ
Custom script: set udg_ENG_xo = udg_ENG_x + udg_ENG_dx
Custom script: set udg_ENG_yo = udg_ENG_y - udg_ENG_dy
Иначе - ДейÑтвиÑ
Custom script: set udg_CP_Point = Location(udg_ENG_xo, udg_ENG_y)
Триггер - Run Check Walkability <gen> (ignoring conditions)
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
ЕÑли - УÑловиÑ
CP_PointIsWalkable равно (==) Ðет
То - ДейÑтвиÑ
Set ENG_NFA = ((180.00 + (Random real number between (-1.00 x ENG_AngleDeformationFactor) and (1.00 x ENG_AngleDeformationFactor))) - ENG_RA)
Иначе - ДейÑтвиÑ
Set ENG_NFA = ((0.00 + (Random real number between (-1.00 x ENG_AngleDeformationFactor) and (1.00 x ENG_AngleDeformationFactor))) - ENG_RA)
Custom script: call RemoveLocation(udg_CP_Point)
Ð¥Ñш-таблица - Clear all child hashtables of child ENG_key in ENG_hash
ОтрÑд - Remove (Picked unit) from ENG_group
Ð‘Ð¾ÐµÐ²Ð°Ñ ÐµÐ´Ð¸Ð½Ð¸Ñ†Ð° - Remove TempUnit from the game
Ð‘Ð¾ÐµÐ²Ð°Ñ ÐµÐ´Ð¸Ð½Ð¸Ñ†Ð° - Create 1 ENG_UnitType for Игрок 1 (краÑный) at TempPoint facing ENG_NFA degrees
Set ENG_Unit = (Last created unit)
Custom script: set udg_ENG_HandleId0 = GetHandleId(udg_ENG_Unit)
ОтрÑд - Add ENG_Unit to ENG_group
ÐÐ½Ð¸Ð¼Ð°Ñ†Ð¸Ñ - Change ENG_Unit's size to (ENG_size%, ENG_size%, ENG_size%) of its original size
ÐÐ½Ð¸Ð¼Ð°Ñ†Ð¸Ñ - Change ENG_Unit's animation speed to (ENG_AnimationFactor x ENG_SpeedFactor)% of its original speed
Set TempGroup = (Units within ((1.00 x ENG_TouchKoefficient) x ENG_size) of TempPoint2 matching (((Unit-type of (Matching unit)) равно (==) (Unit-type of (Picked unit))) and ((Matching unit) не равно (!=) TempUnit)))
ОтрÑд - Pick every unit in TempGroup and do (Actions)
Цикл - ДейÑтвиÑ
Игра - Display to (All players) the text: (Name of (Picked unit))
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
ЕÑли - УÑловиÑ
(Number of units in TempGroup) не равно (!=) 0
То - ДейÑтвиÑ
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
ЕÑли - УÑловиÑ
ENG_IsExplode равно (==) Да
То - ДейÑтвиÑ
Set ENG_Picked = (Picked unit)
Set TempPoint = (Position of (Picked unit))
-------- Взрыв здеÑÑŒ --------
Set ENG_key2 = (Key (Picked unit))
Set ENG_size2 = (Load (Key Size) of ENG_key2 from ENG_hash)
Set ENG_SpeedFactor2 = (Load (Key SpeedFactor) of ENG_key2 from ENG_hash)
Set ENG_TotalDamage = ((((Power(ENG_size, 0.50)) x ENG_SpeedFactor) + ((Power(ENG_size2, 0.50)) x ENG_SpeedFactor2)) x ((Abs(((Facing of TempUnit) - (Facing of (Picked unit))))) + 1.00))
Custom script: set udg_ENG_xm = 0.5 * (GetUnitX(GetEnumUnit()) + GetUnitX(udg_TempUnit))
Custom script: set udg_ENG_ym = 0.5 * (GetUnitY(GetEnumUnit()) + GetUnitY(udg_TempUnit))
Custom script: set udg_TempPoint2 = Location(udg_ENG_xm, udg_ENG_ym)
Custom script: set bj_wantDestroyGroup = true
ОтрÑд - Pick every unit in (Units within 225.00 of TempPoint matching ((Unit-type of (Matching unit)) не равно (!=) (Unit-type of (Picked unit)))) and do (Actions)
Цикл - ДейÑтвиÑ
Set TempPoint = (Position of (Picked unit))
Ð‘Ð¾ÐµÐ²Ð°Ñ ÐµÐ´Ð¸Ð½Ð¸Ñ†Ð° - Cause ENG_Picked to damage (Picked unit), dealing (((Load (Key Size) of ENG_key from ENG_hash) + (Load (Key Size) of ENG_key2 from ENG_hash)) / (0.05 x (Distance between TempPoint and TempPoint2))) damage of attack type Заклинание and damage type Обычный
If you will see nothing here, I will convert this to English text for 6-8 hours. We are repairing our home now
Edit: However it looks ugly because of comments in triggers.
I think it is working now using coordinates. this is the map
Anyway Nice bouncing ball
Btw, I've told you this 2nd times turning on the loop in the trigger is bad you should check if there is any instances by using unit group is empty == true but nevermind..
I think it is working now using coordinates. this is the map
Anyway Nice bouncing ball
Btw, I've told you this 2nd times turning on the loop in the trigger is bad you should check if there is any instances by using unit group is empty == true but nevermind..
Balls should bounce apart(fromout each other or something like this, I dont know how to say this D).
Ofc I have also some phisycs and maths problems but firstly I need to make good moving and group checking...
Balls should bounce apart(fromout each other or something like this, I dont know how to say this D).
Ofc I have also some phisycs and maths problems but firstly I need to make good moving and group checking...
I think that's weirdooo....... but dude There's no wrong using SetUnitPosition why you're keeping yourself using SetUnitX/Y? SetUnitX/Y uses coordinates and they do not disrupt orders of the unit, The SetUnitPosition sets the unit location and disrupting them like pausing them when they move. I think you can use SetUnitPosition because your dummy ball do not have taken any orders and it is working as you said when you used it so stick with that function dude but you have to remove leaks )... Anyway you have leaks when you using coordinates because you're making them location instead of real dude :/ your doing like this.
JASS:
set someRealX = GetUnitX(unit)
set someRealY = GetUnitY(unit)
set loc = Location(someRealX,someRealY)
don't do that you must not turn them to location. you MUST do it like this
JASS:
set someRealX = GetUnitX(unit)
set someRealY = GetUnitY(unit)
set unit = CreateUnit(player,'u000',someRealX,someRealY,0.)
And I think the CheckWalkability is the problem dude..
I think that's weirdooo....... but dude There's no wrong using SetUnitPosition why you're keeping yourself using SetUnitX/Y? SetUnitX/Y uses coordinates and they do not disrupt orders of the unit, The SetUnitPosition sets the unit location and disrupting them like pausing them when they move. I think you can use SetUnitPosition because your dummy ball do not have taken any orders and it is working as you said when you used it so stick with that function dude but you have to remove leaks )... Anyway you have leaks when you using coordinates because you're making them location instead of real dude :/ your doing like this.
JASS:
set someRealX = GetUnitX(unit)
set someRealY = GetUnitY(unit)
set loc = Location(someRealX,someRealY)
don't do that you must not turn them to location. you MUST do it like this
JASS:
set someRealX = GetUnitX(unit)
set someRealY = GetUnitY(unit)
set unit = CreateUnit(player,'u000',someRealX,someRealY,0.)
And I think the CheckWalkability is the problem dude..
Yeah, using SetUnitPosition it works fine, but after doing ball bounce, I will add 3rd coordination and then I will need to use SetUnitX anyway. Because SetUnitPosition checks walkability and I dont need it. My units arent fly because it cause wall-bounce bugs.
About leaking and other stuff, I will repair it after system would be done
Edit: with this CS
JASS:
set unit = CreateUnit(player,'u000',someRealX,someRealY,0.)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.