Just one simple question, is it possible to make an condition that is based on wheres a building/unit (a raven tower) are facing such as:
If unit is facing region above (90*) then add 100 minerals
You want the Facing Angle of Unit element for part of a condition on whatever event you're using (like Unit Enters/Leaves Region). As to the exact comparisons you'll need, i'm not sure what they are but if you mess around you should be able to figure it out.
I can give the example.
My Zealot faces my left, right, up or down regions randomly every 3 seconds
And now I am trying to make an scoring system so if unit is facing the region named up then add 1 mineral to player 1
For that, you'll probably want to put a 3d point down at the center of each region (or up if you only care about that one), then use the Angle Between Points condition. See this sample trigger:
Untitled Trigger 001
Events
Unit - Any Unit Enters a distance of 10.0 from Xel'Naga Tower [72.00, 77.00]
Local Variables
Conditions
(Angle from (Position of (Triggering unit)) to Point 001) <= 45.0 This is the Angle Between Points condition
Actions insert actions here
Okey heres the thing is that the event is that when player 1 presses W then give 1 mineral to player 1, and now I need the condition and that is that if the zealot is facing the up region (or 90 degrees).
Hey guys
Just one simple question, is it possible to make an condition that is based on wheres a building/unit (a raven tower) are facing such as: If unit is facing region above (90*) then add 100 minerals
Thank you!
You want the Facing Angle of Unit element for part of a condition on whatever event you're using (like Unit Enters/Leaves Region). As to the exact comparisons you'll need, i'm not sure what they are but if you mess around you should be able to figure it out.
@RCIX: Go
I can give the example. My Zealot faces my left, right, up or down regions randomly every 3 seconds And now I am trying to make an scoring system so if unit is facing the region named up then add 1 mineral to player 1
For that, you'll probably want to put a 3d point down at the center of each region (or up if you only care about that one), then use the Angle Between Points condition. See this sample trigger:
Untitled Trigger 001
Events
Unit - Any Unit Enters a distance of 10.0 from Xel'Naga Tower [72.00, 77.00]
Local Variables
Conditions
(Angle from (Position of (Triggering unit)) to Point 001) <= 45.0 This is the Angle Between Points condition
Actions
insert actions here
@RCIX: Go
Okey heres the thing is that the event is that when player 1 presses W then give 1 mineral to player 1, and now I need the condition and that is that if the zealot is facing the up region (or 90 degrees).
Solved!