i got a problem with the angle function:
as you can see, it's a very simple trigger, but it returns a negative value when the angle between the points is greater than 180.
the units are always displayed correctly.
the ability push is based on channel.
maybe it's because i'm using the maximum map size(256x256)?
so why is it acting this way.
Trigger:
- Events
- Unit - A unit starts the effect of an ability
- Conditions
- (Ability being cast) equal to push
- Actions
- Set pushTarget = (Target unit of ability being cast)
- Set pushAngle = (Angle from (Position of (Casting unit)) to (Position of pushTarget))
- Game - Display to (All players) the text: (String(pushAngle))
- Game - Display to (All players) the text: (Name of pushTarget)
- Game - Display to (All players) the text: (Name of Casting unit)
as you can see, it's a very simple trigger, but it returns a negative value when the angle between the points is greater than 180.
the units are always displayed correctly.
the ability push is based on channel.
maybe it's because i'm using the maximum map size(256x256)?
so why is it acting this way.