- Joined
- Feb 13, 2019
- Messages
- 128
Helllloo I'm still learning the ropes to say the least and I was hoping someone could lend me hand with setting up a backstab trigger, I'm going to attempt to use a damage engine with this so I just need it to work as if a unit cast a spell behind another unit this goes off to alert the damage engine so I can have spells/attacks do more damage from behind.
really the issue I'm mainly having is just putting this trigger I found here on hive into my map, I got pretty close but I can't seem to figure out how to make my:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Acos((Cos((Angle from p1 to p2))))) Less than 90.00
Into:
If - Conditions
Like in this trigger:
It's just finding the "- (Facing of u2))))))" part of this trigger in the GUI that has me confused, I'd really appreciate the help from the old pros!
But I feel like I need the "- (Facing of u2))))))" because what I have now doesn't seem to react properly, I get the backstab alert to pop up, but it seems as if it's not updating with the units, say my footman is backstabbing the peon and he runs in another direction I can no longer proc the back stab, and sometimes I can proc it when the units are face to face which needless to say is not how I'd like my backstab trigger to perform xD
-
Untitled Trigger 001
-
Events
-
Unit - A unit Is attacked
-
-
Conditions
-
Actions
-
Set u1 = (Attacking unit)
-
Set u2 = (Attacked unit)
-
Set p1 = (Position of u1)
-
Set p2 = (Position of u2)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Acos((Cos((Angle from p1 to p2))))) Less than 90.00
-
-
Then - Actions
-
Floating Text - Create floating text that reads backstab! at p1 with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
-
Floating Text - Change (Last created floating text): Disable permanence
-
-
Else - Actions
-
Custom script: call RemoveLocation(udg_p1)
-
Custom script: call RemoveLocation(udg_p2)
-
-
-
-
really the issue I'm mainly having is just putting this trigger I found here on hive into my map, I got pretty close but I can't seem to figure out how to make my:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Acos((Cos((Angle from p1 to p2))))) Less than 90.00
Into:


Like in this trigger:
-
BS3
-
Events
-
Unit - A unit Is attacked
-
Conditions
-
Actions
-
Set u1 = (Attacking unit)
-
Set u2 = (Attacked unit)
-
Set p1 = (Position of u1)
-
Set p2 = (Position of u2)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Acos((Cos(((Angle from p1 to p2) - (Facing of u2)))))) Less than 90.00
-
Then - Actions
-
Game - Display to Player Group - Player 1 (Red) the text: Backstab!
-
Else - Actions
-
Custom script: call RemoveLocation(udg_p1)
-
Custom script: call RemoveLocation(udg_p2)
It's just finding the "- (Facing of u2))))))" part of this trigger in the GUI that has me confused, I'd really appreciate the help from the old pros!
But I feel like I need the "- (Facing of u2))))))" because what I have now doesn't seem to react properly, I get the backstab alert to pop up, but it seems as if it's not updating with the units, say my footman is backstabbing the peon and he runs in another direction I can no longer proc the back stab, and sometimes I can proc it when the units are face to face which needless to say is not how I'd like my backstab trigger to perform xD