- Joined
- Jul 22, 2015
- Messages
- 3,485
Looking to get some constructive criticism on my camera system for my project map. The way it works is if either of the two players type "-cam" followed by a number, it sets the camera height to that number. Typing "-cam default" will set it back to... well default height! I have it in a loop so that using the scroll wheel doesn't reset the camera height.
EDIT: This is for the updated trigger.
-
Camera Init
-
Events
- Player - Player 2 (Blue) types a chat message containing -cam as A substring
- Player - Player 10 (Light Blue) types a chat message containing -cam as A substring
-
Conditions
- (Substring((Entered chat string), 6, (Length of (Entered chat string)))) Not equal to <Empty String>
-
Actions
- Set CameraSystem_Group = (Player group((Triggering player)))
- Set CameraSystem_Height = (Real((Substring((Entered chat string), 6, 9))))
- Trigger - Turn on Camera Loop <gen>
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Substring((Entered chat string), 6, 12)) Equal to default
-
Then - Actions
- Camera - Set (Triggering player)'s camera Distance to target to 1650.00 over 1.00 seconds
- Custom script: call DestroyForce (udg_CameraSystem_Group)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of players in CameraSystem_Group) Equal to 0
-
Then - Actions
- Trigger - Turn off Camera Loop <gen>
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
Events
-
Camera Loop
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
Player Group - Pick every player in CameraSystem_Group and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- CameraSystem_Height Less than or equal to 3000.00
- CameraSystem_Height Greater than or equal to 500.00
-
Then - Actions
- Camera - Set (Picked player)'s camera Distance to target to CameraSystem_Height over 1.00 seconds
-
Else - Actions
- Game - Display to CameraSystem_Group for 5.00 seconds the text: |cffff0000Camera Er...
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- CameraSystem_Height Greater than or equal to 3001.00
-
Then - Actions
- Set CameraSystem_Height = 3000.00
- Camera - Set (Picked player)'s camera Distance to target to CameraSystem_Height over 1.00 seconds
- Game - Display to CameraSystem_Group for 5.00 seconds the text: Camera height has b...
-
Else - Actions
- Set CameraSystem_Height = 500.00
- Camera - Set (Picked player)'s camera Distance to target to CameraSystem_Height over 1.00 seconds
- Game - Display to CameraSystem_Group for 5.00 seconds the text: Camera has been set...
-
If - Conditions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Player Group - Pick every player in CameraSystem_Group and do (Actions)
-
Events
EDIT: This is for the updated trigger.
-
Camera Init
-
Events
- Player - Player 2 (Blue) types a chat message containing -cam as A substring
- Player - Player 10 (Light Blue) types a chat message containing -cam as A substring
-
Conditions
- (Substring((Entered chat string), 6, (Length of (Entered chat string)))) Not equal to <Empty String>
-
Actions
- Set CameraSystem_Group = (Player group((Triggering player)))
- Set CameraSystem_Player = (Player number of (Triggering player))
- Set CameraSystem_EnteredString = (Substring((Entered chat string), 6, 9))
- Set CameraSystem_MinHeight = 500.00
- Set CameraSystem_MaxHeight = 3000.00
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Substring((Entered chat string), 6, 12)) Equal to default
-
Then - Actions
- Camera - Reset camera for (Triggering player) to standard game-view over 1.00 seconds
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (Real(CameraSystem_EnteredString)) Less than CameraSystem_MinHeight
- (Real(CameraSystem_EnteredString)) Greater than CameraSystem_MaxHeight
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
- Game - Display to CameraSystem_Group for 2.00 seconds the text: |cffff0000Camera Er...
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Real(CameraSystem_EnteredString)) Greater than CameraSystem_MaxHeight
-
Then - Actions
- Game - Display to CameraSystem_Group for 2.00 seconds the text: Setting camera heig...
- Set CameraSystem_Height[CameraSystem_Player] = CameraSystem_MaxHeight
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Real(CameraSystem_EnteredString)) Less than CameraSystem_MinHeight
-
Then - Actions
- Game - Display to CameraSystem_Group for 2.00 seconds the text: Setting camera heig...
- Set CameraSystem_Height[CameraSystem_Player] = CameraSystem_MinHeight
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
- Set CameraSystem_Height[CameraSystem_Player] = (Real(CameraSystem_EnteredString))
- Camera - Set (Picked player)'s camera Distance to target to CameraSystem_Height[CameraSystem_Player] over 1.00 seconds
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Events
-
Camera Loop
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
Player Group - Pick every player in CameraSystem_Group and do (Actions)
-
Loop - Actions
- Set CameraSystem_Player = (Player number of (Triggering player))
- Camera - Set (Picked player)'s camera Distance to target to CameraSystem_Height[CameraSystem_Player] over 1.00 seconds
-
Loop - Actions
-
Player Group - Pick every player in CameraSystem_Group and do (Actions)
-
Events
Last edited: