- Joined
- Apr 16, 2010
- Messages
- 584
Hello! Guys/girls, i got problems with my trigger, i want to move unit to some location offset by (let's say 10) and towards (let's say 240 degrees), but i also want to play that unit animation during its moving. I'm new to JASS to i don't really know hot to do that, i searched a lot of forums but still...
Okay so i did this
But i need to know where and how to add distance and angle (if i did it wrong)? and why do i need to make angle in radians only?
Also i need a third script that finally move Caster to the point.
Hope i told everything clear and you'll easily understand!
Help is really appreciated!
Okay so i did this
-
Custom script: call SetUnitX( udg_Caster , GetUnitX(udg_Caster) )
-
Custom script: call SetUnitY( udg_Caster , GetUnitY(udg_Caster) )
-
Custom script: SetUnitX(udg_Caster),GetUnitX(udg_Caster)+udg_Range*Cos(udg_Angle)
-
Custom script: SetUnitY(udg_Caster),GetUnitY(udg_Caster)+udg_Range*Sin(udg_Angle)
But i need to know where and how to add distance and angle (if i did it wrong)? and why do i need to make angle in radians only?
Also i need a third script that finally move Caster to the point.
Hope i told everything clear and you'll easily understand!
Help is really appreciated!