- Joined
- Oct 9, 2015
- Messages
- 721
So what I'm trying to acomplish is when an unit enter the x region, the camera will be panned to the center of region and locked to the middle unit in the region, in this case the horse in the middle.
Then I set a boolean to true and if the player presses the left or right key while said boolean is true then I want the camera to be locked to the unit to the sides. The problem is I'm not being able to acomplish what I want. It's working in a really wierd way and I could't figure out a solution by myself.
Thanks in advice, help is much appreciated!
Here's an video with example, however I can only make it work one time.
https://www.youtube.com/watch?v=gCV0c_V1csc
Here are the triggers I've made so far:
Then I set a boolean to true and if the player presses the left or right key while said boolean is true then I want the camera to be locked to the unit to the sides. The problem is I'm not being able to acomplish what I want. It's working in a really wierd way and I could't figure out a solution by myself.
Thanks in advice, help is much appreciated!
Here's an video with example, however I can only make it work one time.
https://www.youtube.com/watch?v=gCV0c_V1csc
Here are the triggers I've made so far:
-
Trigger 1
-
Events
- Unit - A unit enters Region X <gen>
- Conditions
-
Actions
- Set NoCamera = True (this is the boolean)
- Set HorseMiddle = True (this is a check to see if the camera is in the middle horse)
- Camera - Pan camera for Player 1 (Red) to (Position of Horse Middle) over 0.50 seconds
- Camera - Lock camera target for Player 1 (Red) to Horse Middle, offset by (0.00, 0.00) using Default rotation
-
Events
-
Trigger 2
-
Events
- Player - Player 1 (Red) Presses the Left Arrow key
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- NoCamera Equal to True
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- HorseLeft Equal to False
- HorseMiddle Equal to True
- HorseRight Equal to False
-
Then - Actions
- Set HorseLeft = True
- Set HorseMiddle = False
- Set HorseRight = True
- Camera - Lock camera target for Player 1 (Red) to Horse Left, offset by (0.00, 0.00) using The unit's rotation
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- HorseLeft Equal to True
- HorseMiddle Equal to False
- HorseRight Equal to False
-
Then - Actions
- Set HorseLeft = False
- Set HorseMiddle = False
- Set HorseRight = True
- Camera - Lock camera target for Player 1 (Red) to Horse Right, offset by (0.00, 0.00) using The unit's rotation
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events