PtRvY's Camera Scripting Tutorial for San Andreas.Things you'll need:-
Sanny Builder 3get it here:
www.sannybuilder.com-
Basic main.scm, by Labilouteget it here:
https://dl.dropboxusercontent.com/u/94754009/Basic_SCM_By_Labiloute.txtBefore we begin!Make sure you have backed up your original / Dannye's main.scm.
Make sure you have configured your Sanny Builder to point to the right SA folder.
For Windows 7 Users: Run Sanny Builder and GTA
as administrator!
Let's start!1. Alright, fire up Sanny Builder. After it's done loading you should see this screen:
![](http://noob.hu/2011/05/20/tut_img1.png)
2. Create a
new script, by going to
File =>
New... or by clicking the icon in the toolbox.
Copy all the text contained in the basic .scm into this new script.After you've pasted everything in, it should look like this:
![](http://noob.hu/2011/05/20/tut_img2.png)
3. I won't bother explaining what all the basic .scm's functions mean, since that's not the focus of this tutorial - maybe some other time. Now start writing the following text
between the "wait 1000" and "end_thread" (the final two) lines:
0460: set_camera_transverse_delay 0.0 time <T>
015F: set_camera_position X Y Z rotation 0.0 0.0 0.0
0160: set_camera_point_at X1 Y1 Z1 mode 2
wait <T>
015F: set_camera_position X Y Z rotation 0.0 0.0 0.0
0160: set_camera_point_at X1 Y1 Z1 mode 1
wait <T>
015F: set_camera_position X Y Z rotation 0.0 0.0 0.0
0160: set_camera_point_at X1 Y1 Z1 mode 1
wait <T>It should now look like this:
![](http://noob.hu/2011/05/20/tut_img3.png)
4. Now, replace all the "<T>" with the
amount of time (in
miliseconds,
1000 = 1 second) that you want the camera to travel from one point to another. In this example I will put 3 seconds or 3000.
In my example it should look like this:
![](http://noob.hu/2011/05/20/tut_img4.png)
5. Now it's time to pick positions for your camera. Fire up San Andreas (and leave Sanny Builder open).
------------------------
This is the only part which could be hard to understand ---------------------------------
A
camera angle is determined with
two X-Y-Z points.
One point is the
position of the camera, and the other point is the point the camera is
focused ("looking") at.
-------------------------------------------------------------------------------------------------------------------------------------------------
Now that you've
opened San Andreas, use the
jetpack from Dannye's to get to a point which could be a good position for the camera, and then
minimize (
Alt+Tab) out of the game.
In my example, this seems to be a nice position for the camera, looking up to the skyscrapers:
![](http://noob.hu/2011/05/20/position1.png)
After
minimizing, go to Sanny Builder's
coordinate reader.
It can be found in
Tools =>
IDE Tools =>
Coords Manager...The tool will automatically read the coordinates from SA, but
click "Read" just to be sure.
Copy the X, Y and Z values instead of the first X Y Z in the code we added.
Here's how my code looks after this change:
![](http://noob.hu/2011/05/20/tut_img5.png)
6. I mentioned I want the camera to look at the skyscrapers, so a good focus point could be on top of a skyscraper. Go back to SA, and use the jetpack to get on top of a skyscraper (or, any other suitable looking point for your camera).
![](http://noob.hu/2011/05/20/position2.png)
And then,
minimize the game again, and
read the coordinates.
This time, paste them into the first X1, Y1 and Z1.Here's how my code looks now:
![](http://noob.hu/2011/05/20/tut_img6.png)
7. Make new camera angles by
repeating steps
5 and
6 for the 2nd set of X Y Z and X1 Y1 Z1, and same for the 3rd.
If you want more than three camera angles, just paste the last three lines behind the last wait:
015F: set_camera_position X Y Z rotation 0.0 0.0 0.0
0160: set_camera_point_at X1 Y1 Z1 mode 1
wait <T>And replace the values, for every new camera angle you want.
8.
Close San Andreas, hit
F7 on your keyboard (Compile + Copy), save the .txt file anywhere, it will then compile the created
main.scm and script.img files into the SA folder. Now you can fire up San Andreas again.
Start a
new game.
Your camera script should start playing out after a second or two. You can record it with Fraps immediately or save a replay which you can then work on.
In order to go back to your normal game, paste the backup main.scm and script.img files into the /data/script folder of your SA.
-----------------------------------
Any questions, bug notifications, and criticism are appreciated.