INTRODUCTION
If you can't figure out how to use Pfhortran after reading this, don't blame me - I just compiled other peoples' notes into this accessible library. I still don't know how to use Pfhortran myself...
INDEX
Camera Management
This
section courtesy EE
Cameras can be used to create cutscenes (to explain things a little), or to give information on the current situation without using a terminal. There are two kind of cameras, moving, and static.
Static cameras are the easiest; you just need to define a camera and set its position. Moving cameras are harder, but use the same technique. You will need to define a path for the camera to travel along by choosing passing points.
The position of a camera or point need 6 values : X, Y, Z, poly, yaw, and pitch. These can be get by using either Aleph One info (F10), or using Loren's MapViewer. I prefer MapViewer because there is not gravity and no clipping in it.
Here are the tips for creating a static camera :
1. Choose what your camera should focalize on.
2. Go into your position-giving program and put the camera where you want it
to be, and write down all the values needed.
3. Use a text editor to write something like this:
_Procedure Init
Init_Cameras 1
Select_Camera 1
Camera_Poly 12
Camera_Pos 2.000, 1.200, 1.000
Camera_YP -0.3, 0.000
End
Init_Cameras tells Aleph how many cameras it should create.
Select_Camera tells Pfhortran to select which camera for editing its values.
Camera_Poly, Camera_Pos & Camera_YP set the actual position of the camera.
Now use this camera in-game.
You'll want to use this camera after a certain event, it can be activating a light, a platform, a tag, getting an item, exiting a terminal, or even after a certain delay. See which procedure is the best to use in your case. Put this in your chosen procedure:
Disable_Player
Use_Camera 1
Wait_Ticks 30
Use_Camera 0
Enable_Player
Disable_Player disables player movement.
Use_Camera 1 tells Pfhortran to use the camera specified, in this case the one
above.
Wait_Ticks tells Pfhortran to wait 1 second before next instruction. It is used
as a delay to stay on the camera before going back on Player.
Use_Camera 0 tells Pfhortran to use the camera specified, 0 is the player's
camera.
Enable_Player enables player movement.
I have noticed than using Disable_Player when the Player is dropped is a bad idea, it crashes Aleph.
Now I'll go into moving cameras. You still need the position of the camera,
but multiple times (one point for each position):
1. Choose where you whan your camera to pass, and where to look at each time.
2. Go into your position-giving program and put the camera where you want it
to be and write down all the values needed for each point.
3. Write something like this:
_procedure init
Init_Cameras 1
Init_Paths 1
New_Path 1,4
Select_Path 1
Set_Path_Move_Speed 100
Set_Path_Roll_Speed 200
Select_Point 0
Set_Point_Poly 328
Set_Point_Pos -30.226, -6.396, 2.6
Set_Point_YP 30.94, -0.38
Select_Point 1
Set_Point_Poly 298
Set_Point_Pos -9.872, -6.996, 2.6
Set_Point_YP 140.94, -0.38
Select_Point 2
Set_Point_Poly 294
Set_Point_Pos -9.690, 1.11, 2.6
Set_Point_YP -169.06, -0.38-0.38
Select_Point 3
Set_Point_Poly 332
Set_Point_Pos -30.823, 8.405, 2.35
Set_Point_YP -39.06, -0.38
Use_Camera 0
End
Init_Paths create a number of paths for cinematics.
New_Paths is used to define the number of points in a path.
Select_Path thell Pfhortran to select a path for editing.
Set_Path_Move_Speed & Set_Path_Roll_Speed set the speed & rate of turn
of the path. See the original docs for a warning about these values. Sometimes
the camera won't roll like it should, so raise its value.
Select_Point select a point of the path for editing, like for a normal camera.
Set_Point_Poly, Set_Point_Pos & Set_Point_YP are the same that for a static
camera.
Now put this in your choosen procedure:
Disable_Player
Select_Camera 1
Start_Camera_On_Path 1
Wait_For_Path
Use_Camera 0
Enable_Player
Start_Camera_On_Path starts the selected camera on the specified path.
Wait_For_Path tells Pfhortran to wait for the path to complete before moving
to next instruction.