OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Mitrokhin on 29 Aug 2002, 13:53:59
-
Hey I just wanted to know how to make new waypoints for the camera anyone?
cyberpunk
-
Like I tried telling you in the PM, explain more.
What do you mean by waypoints?
A camera doesn't use waypoints.
I am guessing that you want to script the movement of the camera. There are two ways of doing it, CamSetPos (Sets an absolute position based on X,Y,Z coords) and CamSetRelPos (Sets a position relative to the target)
_cam01 CamSetPos(getpos GameLogicName)
Is one way of doing it. This will set the position to wherever the Game Logic is. Although it will be at 0 elevation.
_cam01 CamSetPos[100,100,100]
Is another way. This will set the position to 100 X, 100 Y, and 100 Z. Use camera.sqs (Stickied thread at the top of the board) to get exact X,Y,Z coords to use.
_cam01 CamSetRelPos[10,10,10]
This places the camera 10 meters to the left, 10 meters infront, and 10 meters above the target unit.
Now, to make your camera move, you need at least two positions to move between. You don't have to switch target.
Here's a short example.
_cam01 CamSetTarget UnitName
_cam01 CamSetRelPos[5,5,1.7]
CamCommit 0
~10
_cam01 CamSetRelPos[-5,5,1.7]
CamCommit 10
@CamCommitted _cam01
Explanation of these lines.
CamSetTarget is self explanatory
CamSetRelPos will set the camera 5 meters to the left, 5 meters infront and at eye level with your soldier.
CamCommit defines how many seconds the transition will take. 0 for the first one.
~# ~ is delay. It will pause the script at that point for # number of seconds before moving on.
@CamCommitted This tells the script to hold at that position until all previous commands have been executed.
In this case, CamCommit 10 will take 10 seconds to move the camera from [5,5,1.7] to [-1,5,1.7]
If we hadn't put @CamCommitted _cam01 there, the script would just continue running and start with the next operation before the camera transition was complete.
Is this making any sense?
-
no and yes more NO
-
Okay, so that didn't make any sense. Please be a bit more precise when making posts. I know that I am the smartest guy there is, but even I can't understand what you're getting at ;)
-
don't worry about before you replied i found a tutorial on it and it solved my problem thanks anyway! :cheers:
-
Then the problem is solved?
If it is, please use the "solve" button.