Krevett is correct, to move the camera you will have to move the PC. For all of your cutscene time values, you should line them up so that the action occurs as you want it to (this is where using an incrementing variable to keep track of time comes in handy, but not absolutely necessary). As a possibly simpler example to achieve what you are looking for, try using the included GestaltActionMove commands to make moving your actors easier.
I have modified the code you have provided to do this, adding comments where I have made changes.
#include "in_g_cutscene"
void main()
{
object oPC = GetFirstPC();
//Let's declare the wolves ahead of time to clean things up.
object oWolf1 = GetObjectByTag("WinterWolf1");
object oWolf2 = GetObjectByTag("WinterWolf2");
GestaltStartCutscene(oPC, "smoothcam");
GestaltCameraSetup (0.0, oPC, 90.0, 25.0, 20.0);
//Note that I have changed the duration you have put on this function to 20 seconds--that is how long the camera movement will last, after which the camera will be immobile (I prefer to keep the camera in motion until the cutscene has ended or nearly ended). I've also changed the Framerate to 30.0 FPS to smooth out the motion.
GestaltCameraSmooth (0.0,
0.0, -4.0, 0.0,
0.0, 0.0, 8.0,
20.0, 30.0, oPC);
if (!GetIsPC(oPC)) return;
//Added this, setting duration to the end just after the last ActionMove commands will be completed firing (take their fDelay time and add the fTime used in the function).
GestaltInvisibility (0.0, oPC, 20.0);
//For the movement commands we will have to add WPs if we want the camera to be somewhere other than the wolves. For simplicity, I will just use the existing WPs
//Move wolves and camera to first WP in 2 seconds (0.0/18.0).
GestaltActionMove(0.0,oWolf1,GetWaypointByTag(WP_Winterwolf1_01"),FALSE,0.0,2.0);
GestaltActionMove(0.0,oWolf2,GetWaypointByTag(WP_Winterwolf2_01"),FALSE,0.0,2.0);
GestaltActionMove(0.0,oPC,GetWaypointByTag(WP_Winterwolf2_01"),FALSE,0.0,2.0);
//Move wolves and camera to second WP in 2 seconds (2.0/18.0).
GestaltActionMove(2.0,oWolf1,GetWaypointByTag(WP_Winterwolf1_02"),FALSE,0.0,2.0);
GestaltActionMove(2.0,oWolf2,GetWaypointByTag(WP_Winterwolf2_02"),FALSE,0.0,2.0);
GestaltActionMove(2.0,oPC,GetWaypointByTag(WP_Winterwolf2_02"),FALSE,0.0,2.0);
//...etc, etc, for the remaining WPs, until...
//Move wolves and camera to final WP in 2 seconds (16.0/18.0).
GestaltActionMove(16.0,oWolf1,GetWaypointByTag(WP_Winterwolf1_09"),FALSE,0.0,2.0);
GestaltActionMove(16.0,oWolf2,GetWaypointByTag(WP_Winterwolf2_09"),FALSE,0.0,2.0);
GestaltActionMove(16.0,oPC,GetWaypointByTag(WP_Winterwolf2_09"),FALSE,0.0,2.0);
//The wolves should reach their destination at 18.0 seconds into the cutscene, and the camera should finish moving at 20.0 seconds; at this point we can move the PC camera back to where it started (I recommend using a new WP for this, or if you wanted the PC visibly left at its location, you can jump back to the clone you created by using GestaltActionJump with the tag of the created clone as the target).
//Jump camera back to where PC should be
GestaltActionJump(20.0,oPC,OBJECT_INVALID,"WP_CutsceneStart");
//Clean up the cutscene actors (now that they're off-screen) and end the scene. If you wanted the PC to see the actors disappear, just move the fDelay on these up to 18.0, when the wolves reached their destinations.
GestaltDestroy(20.0,oWolf1);
GestaltDestroy(20.0,oWolf2);
GestaltStopCutscene (20.0, oPC);
}
Apologies for any errors in the code, I do not have the time to test it before work. Note that you can reduce the number of commands firing by reducing the number of WPs you are using to control the movement--two points is good enough for a line.
Modifié par Balduvard, 24 janvier 2011 - 01:14 .