- Joined
- Apr 19, 2011
- Messages
- 447
Hi there.
I have almost completed the third person view camera system for my proyect, but thera is still one thing I can't fix.
Let's see, I'll begin posting all the triggers of the system (they are 14):
NOTE: Before each of the triggers, I put ON or OFF. That indicates if the trigger is initially ON or initially OFF.
ON
ON
ON
ON
ON
OFF
ON
ON
OFF
Camera_View is a real variable.
Camera_Height is a real variable.
Hero_position is a point variable.
Hero_Z is a real variable.
CAMERA_CONTROL is a boolean variable. It's always true. It only gets false during cinematics, for obvious reasons.
Now, until here, the system works fine. The camera folows the Hero, and the player can rotate the camera around with the arrow keys. It doen't lag at all, it's all nice and good.
OK, now I tried to let the player move the camera up and down with the other two arrow keys (Up and Down). However, I can't let the player do this infinitely. The maximum angle of attack should be 350.00, and the minimum should be 310.00. fine, THAT is what I'm not able to do.
Here are the rest of the triggers:
ON
ON
OFF
ON
ON
OFF
That's it. It doesn't work. When I press the Down arrow key, the camera goes straight to the 310.00 angle of attack position, no matter what it currently has. When I press the Up arrow key, the camera's angle of attack just keeps increasing indefinitely.
I know that this may not be the best and most efficient way to make this camera system, but that's how I tried to do it. And now, I want to know what's wrong with it. I gave you all the triggers of the system, and I told you what's the error, so I hope you could help me find the problem.
Thanks in advance, and sorry for the long post.
Regards
I have almost completed the third person view camera system for my proyect, but thera is still one thing I can't fix.
Let's see, I'll begin posting all the triggers of the system (they are 14):
NOTE: Before each of the triggers, I put ON or OFF. That indicates if the trigger is initially ON or initially OFF.
ON
-
Camera variables
-
Events
-
Time - Every 0.01 seconds of game time
-
-
Conditions
-
CAMERA_CONTROL is Equal to True
-
-
Actions
-
Set Camera_View = (Rotation of Current Camera)
-
Set Camera_Height = (Angle of attack of Current Camera)
-
-
-
Hero's position
-
Events
-
Events - every 0.05 seconds of game time
-
-
Conditions
-
Actions
-
Set Hero_Position = (Position of Hero)
-
Custom script: set udg_Hero_Z = GetLocationZ(udg_Hero_Position)
-
-
-
Camera Settings
-
Events
-
Time - Every 0.05 seconds of game time
-
-
Conditions
-
CAMERA_CONTROL Equal to True
-
-
Actions
-
Camera - Set Player 1 (red)'s camera Distance to 1000.00 over 0.50 seconds
-
Camera - Set Player 1 (red)'s camera Field of View to 100.00 over 0.50 seconds
-
Camera - Set Player 1 (red)'s camera Z height to Hero_Z over 0.50 seconds
-
Camera - Set Player 1 (red)'s camera Far Clipping to 100000.00 over 0.50 seconds
-
-
-
Move left ON
-
Events
-
Player - Player 1 (red) Presses the Left arrow key
-
-
Conditions
-
CAMERA_CONTROL is Equal to True
-
-
Actions
-
Trigger - Turn on Move left
-
-
-
Move left OFF
-
Events
-
Player - Player 1 (red) Releases the Left arrow key
-
-
Conditions
-
CAMERA_CONTROL is Equal to True
-
-
Actions
-
Trigger - Turn off Move left
-
-
-
Move left
-
Events
-
Time - Every 0.05 seconds of game time
-
-
Conditions
-
CAMERA_CONTROL is Equal to True
-
-
Actions
-
Camera - Set Player 1 (red)'s camera Rotation to (Camera_View + 8.00) over 0.10 seconds
-
-
-
Move right ON
-
Events
-
Player - Player 1 (red) Presses the Right arrow key
-
-
Conditions
-
CAMERA_CONTROL is Equal to True
-
-
Actions
-
Trigger - Turn on Move right
-
-
-
Move right OFF
-
Events
-
Player - Player 1 (red) Releases the Right arrow key
-
-
Conditions
-
CAMERA_CONTROL is Equal to True
-
-
Actions
-
Trigger - Turn off Move right
-
-
-
Move right
-
Events
-
Time - Every 0.05 seconds of game time
-
-
Conditions
-
CAMERA_CONTROL is Equal to True
-
-
Actions
-
Camera - Set Player 1 (red)'s camera Rotation to (Camera_View - 8.00) over 0.10 seconds
-
-
Camera_Height is a real variable.
Hero_position is a point variable.
Hero_Z is a real variable.
CAMERA_CONTROL is a boolean variable. It's always true. It only gets false during cinematics, for obvious reasons.
Now, until here, the system works fine. The camera folows the Hero, and the player can rotate the camera around with the arrow keys. It doen't lag at all, it's all nice and good.
OK, now I tried to let the player move the camera up and down with the other two arrow keys (Up and Down). However, I can't let the player do this infinitely. The maximum angle of attack should be 350.00, and the minimum should be 310.00. fine, THAT is what I'm not able to do.
Here are the rest of the triggers:
ON
-
Move up ON
-
Events
-
Player - Player 1 (red) Presses the Up arrow key
-
-
Conditions
-
CAMERA_CONTROL is Equal to True
-
-
Actions
-
Trigger - Turn on Move up
-
-
-
Move up OFF
-
Events
-
Player - Player 1 (red) Releases the Up arrow key
-
-
Conditions
-
CAMERA_CONTROL is Equal to True
-
-
Actions
-
Trigger - Turn off Move up
-
-
-
Move up
-
Events
-
Time - Every 0.05 seconds of game time
-
-
Conditions
-
CAMERA_CONTROL is Equal to True
-
-
Actions
-
Camera - Set Player 1 (red)'s camera Angle of attack to (Camera_Height + 5.00) over 0.10 seconds
-
If (All Conditions are True) then do (Then Actions) else do (Else actions)
-
If: Conditions
-
(Angle of attack of the current camera view) Higher or equal than 350.00
-
-
Then: Actions
-
Camera - Set Player 1 (red)'s camera Angle of attack to 350.00 over 0.10 seconds
-
Trigger - Run Move up OFF <gen> (checking conditions)
-
-
Else: Actions
-
Do nothing
-
-
-
-
-
Move down ON
-
Events
-
Player - Player 1 (red) Presses the Down arrow key
-
-
Conditions
-
CAMERA_CONTROL is Equal to True
-
-
Actions
-
Trigger - Turn on Move down
-
-
-
Move down OFF
-
Events
-
Player - Player 1 (red) Releases the Down arrow key
-
-
Conditions
-
CAMERA_CONTROL is Equal to True
-
-
Actions
-
Trigger - Turn off Move down
-
-
-
Move down
-
Events
-
Time - Every 0.05 seconds of game time
-
-
Conditions
-
CAMERA_CONTROL is Equal to True
-
-
Actions
-
Camera - Set Player 1 (red)'s camera Angle of attack to (Camera_Height - 5.00) over 0.10 seconds
-
If (All Conditions are True) then do (Then Actions) else do (Else actions)
-
If: Conditions
-
(Angle of attack of the current camera view) Lesser or equal than 310.00
-
-
Then: Actions
-
Camera - Set Player 1 (red)'s camera Angle of attack to 310.00 over 0.10 seconds
-
Trigger - Run Move down OFF <gen> (checking conditions)
-
-
Else: Actions
-
Do nothing
-
-
-
-
I know that this may not be the best and most efficient way to make this camera system, but that's how I tried to do it. And now, I want to know what's wrong with it. I gave you all the triggers of the system, and I told you what's the error, so I hope you could help me find the problem.
Thanks in advance, and sorry for the long post.
Regards