- Joined
- Mar 1, 2013
- Messages
- 555
Hey everyone. I have a simple math problem where I want to change the location of a unit without creating or destroying locations:
EDIT: Nevermind I've found the problem. I used the wrong variable in the SetUnitY() function. I feel like an idiot... XD
-
Set MeatHChainX[MeatHRef] = (MeatHChainX[MeatHRef] + (MeatHSpeed[MeatHRef] x (Cos(MeatHDeg[MeatHRef]))))
-
Set MeatHChainY[MeatHRef] = (MeatHChainY[MeatHRef] + (MeatHSpeed[MeatHRef] x (Sin(MeatHDeg[MeatHRef]))))
-
Custom script: call SetUnitX(udg_MeatHHead, udg_MeatHChainX[udg_MeatHRef])
-
Custom script: call SetUnitY(udg_MeatHHead, udg_MeatHChainX[udg_MeatHRef])
EDIT: Nevermind I've found the problem. I used the wrong variable in the SetUnitY() function. I feel like an idiot... XD