- Joined
- Oct 23, 2006
- Messages
- 223
I know this is an option available for WEU, but the problem is it takes too much space to add the advance triggers. How would i do this normally? If not, is der any other way to calculate angles for a backstab spell?
Wow it's much simpler...
A = Facing of Attacker
B = Facing of Target
If -45 < (A-B) AND (A-B) < 45, then the Attacker is behind the Target.
While you are correct in this, a unit typically faces a target when attacking, and using attacker's facing eliminates the necessity to deal with stuff like tangents, etc...Well I think it has nothing to do with the attacker's facing
your right ^^ mine works for ranged units (although those do not backSTAB ^^)
Backstab
Events
Unit - A unit Is attacked
Conditions
(Unit-type of (Attacking unit)) Equal to Assassin ** or other conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Abs(((Facing of (Attacked unit)) - (Facing of (Attacking unit))))) Less than or equal to 45.00
(Abs(((Facing of (Attacked unit)) - (Facing of (Attacking unit))))) Greater than or equal to 315.00
Then - Actions
Wait 0.20 seconds
Unit - Kill (Triggering unit) ** or other actions
Else - Actions
Do nothing
Good luck!