Squishy
You can change this now in User CP.
- Reaction score
- 127
After seeing some of other Third Person Cameras, I wanted to make my own. So here it is.
Features:
- The Up and Down arrow keys adjust the Angle of Attack
- The Left and Right arrow keys adjust the Rotation
- The Camera snaps back to normal and releasing the Left or Right Arrow key
- The mouse wheel adjusts the zoom
- The Escape Key toggles the Third Person Camera on/off
Pros:
- Easily adjustable in-game
- No text commands
Cons:
- Inefficient (It's in GUI)
- High Terrain causes problems
Triggers:
Features:
- The Up and Down arrow keys adjust the Angle of Attack
- The Left and Right arrow keys adjust the Rotation
- The Camera snaps back to normal and releasing the Left or Right Arrow key
- The mouse wheel adjusts the zoom
- The Escape Key toggles the Third Person Camera on/off
Pros:
- Easily adjustable in-game
- No text commands
Cons:
- Inefficient (It's in GUI)
- High Terrain causes problems
Triggers:
Code:
Camera Initalization
Events
Map initialization
Conditions
Actions
For each (Integer A) from 1 to 16, do (Actions)
Loop - Actions
Trigger - Add to Set Camera Unit <gen> the event (Player - (Player((Integer A))) Selects a unit)
Trigger - Add to Toggle Camera <gen> the event (Player - (Player((Integer A))) skips a cinematic sequence)
Trigger - Add to Left Pressed <gen> the event (Player - (Player((Integer A))) Presses the Left Arrow key)
Trigger - Add to Right Pressed <gen> the event (Player - (Player((Integer A))) Presses the Right Arrow key)
Trigger - Add to Down Pressed <gen> the event (Player - (Player((Integer A))) Presses the Down Arrow key)
Trigger - Add to Up Pressed <gen> the event (Player - (Player((Integer A))) Presses the Up Arrow key)
Trigger - Add to Left Released <gen> the event (Player - (Player((Integer A))) Releases the Left Arrow key)
Trigger - Add to Right Released <gen> the event (Player - (Player((Integer A))) Releases the Right Arrow key)
Trigger - Add to Down Released <gen> the event (Player - (Player((Integer A))) Releases the Down Arrow key)
Trigger - Add to Up Released <gen> the event (Player - (Player((Integer A))) Releases the Up Arrow key)
Code:
Set Camera Unit
Events
Conditions
Actions
Set Camera_Unit[(Player number of (Triggering player))] = (Triggering unit)
Code:
Toggle Camera
Events
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Camera_On[(Player number of (Triggering player))] Equal to True
Then - Actions
Set Camera_On[(Player number of (Triggering player))] = False
Camera - Reset camera for (Triggering player) to standard game-view over 0.00 seconds
Else - Actions
Set Camera_On[(Player number of (Triggering player))] = True
Set Camera_Rotation[(Player number of (Triggering player))] = 90.00
Code:
Change Camera
Events
Time - Every 0.02 seconds of game time
Conditions
Actions
For each (Integer A) from 1 to 16, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Camera_On[(Integer A)] Equal to True
Then - Actions
Set Temp_Point = (Position of Camera_Unit[(Integer A)])
Camera - Pan camera for (Owner of Camera_Unit[(Integer A)]) to Temp_Point over 0.00 seconds
Camera - Rotate camera ((Facing of Camera_Unit[(Integer A)]) - Camera_Rotation[(Integer A)]) degrees around Temp_Point for (Owner of Camera_Unit[(Integer A)]) over 0.00 seconds
Camera - Set (Owner of Camera_Unit[(Integer A)])'s camera Angle of attack to Camera_AoA[(Integer A)] over 0.00 seconds
Custom script: call RemoveLocation (udg_Temp_Point)
Else - Actions
Code:
Modify Rotation
Events
Time - Every 0.02 seconds of game time
Conditions
Actions
For each (Integer A) from 1 to 16, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Camera_On[(Integer A)] Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Left_Pressed[(Integer A)] Equal to True
Right_Pressed[(Integer A)] Equal to False
Then - Actions
Set Camera_Rotation[(Integer A)] = (Camera_Rotation[(Integer A)] + 3.00)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Camera_Rotation[(Integer A)] Greater than 269.00
Then - Actions
Set Camera_Rotation[(Integer A)] = -90.00
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Right_Pressed[(Integer A)] Equal to True
Left_Pressed[(Integer A)] Equal to False
Then - Actions
Set Camera_Rotation[(Integer A)] = (Camera_Rotation[(Integer A)] - 3.00)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Camera_Rotation[(Integer A)] Less than -89.00
Then - Actions
Set Camera_Rotation[(Integer A)] = 270.00
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Right_Pressed[(Integer A)] Equal to False
Left_Pressed[(Integer A)] Equal to False
Camera_Rotation[(Integer A)] Not equal to 90.00
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Camera_Rotation[(Integer A)] Greater than 84.00
Camera_Rotation[(Integer A)] Less than 96.00
Then - Actions
Set Camera_Rotation[(Integer A)] = 90.00
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Camera_Rotation[(Integer A)] Greater than 90.00
Then - Actions
Set Camera_Rotation[(Integer A)] = (Camera_Rotation[(Integer A)] - 6.00)
Else - Actions
Set Camera_Rotation[(Integer A)] = (Camera_Rotation[(Integer A)] + 6.00)
Else - Actions
Else - Actions
Code:
Modify AoA
Events
Time - Every 0.02 seconds of game time
Conditions
Actions
For each (Integer A) from 1 to 16, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Camera_On[(Integer A)] Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Up_Pressed[(Integer A)] Equal to True
Down_Pressed[(Integer A)] Equal to False
Camera_AoA[(Integer A)] Greater than -80.00
Then - Actions
Set Camera_AoA[(Integer A)] = (Camera_AoA[(Integer A)] - 1.50)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Up_Pressed[(Integer A)] Equal to False
Down_Pressed[(Integer A)] Equal to True
Camera_AoA[(Integer A)] Less than -10.00
Then - Actions
Set Camera_AoA[(Integer A)] = (Camera_AoA[(Integer A)] + 1.50)
Else - Actions
Else - Actions
Code:
Left Pressed
Events
Conditions
Actions
Set Left_Pressed[(Player number of (Triggering player))] = True
Code:
Right Pressed
Events
Conditions
Actions
Set Right_Pressed[(Player number of (Triggering player))] = True
Code:
Down Pressed
Events
Conditions
Actions
Set Down_Pressed[(Player number of (Triggering player))] = True
Code:
Up Pressed
Events
Conditions
Actions
Set Up_Pressed[(Player number of (Triggering player))] = True
Code:
Left Released
Events
Conditions
Actions
Set Left_Pressed[(Player number of (Triggering player))] = False
Code:
Right Released
Events
Conditions
Actions
Set Right_Pressed[(Player number of (Triggering player))] = False
Code:
Down Released
Events
Conditions
Actions
Set Down_Pressed[(Player number of (Triggering player))] = False
Code:
Up Released
Events
Conditions
Actions
Set Up_Pressed[(Player number of (Triggering player))] = False