Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Changing camera in cutscene cog
Changing camera in cutscene cog
2006-02-25, 10:10 PM #1
I was wondering if someone could tell me how to change to different cameras in this cog. I'm having trouble finding the right cog verb.

Code:
symbols

message		activated

thing		console	
thing		cam
thing		cam1


flex		speed=2.0
flex		wait=5.0
sound       	playsnd=Accomplish1.wav

int		done=0				local
sound           NotifySnd=beep1.wav		local
int		Player				local
int		check				local

end

code

activated:


if (done ==0)
	{
	
	check = GetSenderRef();
	if (check == console)
		{
		
		Player = GetLocalPlayerThing();

		
		SetActorFlags(Player, 0xa00000);
		
		StopThing(Player);

		
		SetCameraFocus(0, cam);
		SetCurrentCamera(0);

		
		

	
		Sleep(1);
		PlaySoundLocal(NotifySnd, 1, 0, 132);
		Print(">> blah blah<<");
		Sleep(2);
		PlaySoundLocal(NotifySnd, 1, 0, 132);
		Print("blah");
		Sleep(2);
		PlaySoundLocal(NotifySnd, 1, 0, 132);
		Print(">> blah blah. <<");
		Sleep(2);
		PlaySoundLocal(NotifySnd, 1, 0, 132);
		Print("poop.");

                 
                //what is the right verb to change cameras?

                 
		Sleep(wait);

		
		if (jkGetSaberCam() == 1)
		CycleCamera();
		DestroyThing(cam);

		
		ClearActorFlags(Player, 0xa00000);

		done =1;
		}
	}
else
	{
	
	PlaySoundLocal(NotifySnd, 1, 0, 132);
	Print("I couldn't eat another Big Mac!");
	}
return;

end
2006-02-25, 11:35 PM #2
Welcome to Massassi!

I think what you're looking for is SetCameraFocus(0, Player);
Historians are the most powerful and dangerous members of any society. They must be watched carefully... They can spoil everything. - Nikita Khrushchev.
Kill one man, and you are a murderer. Kill millions of men, and you are a conqueror. Kill them all, and you are a god. - Jean Rostand.
2006-02-26, 2:32 PM #3
What I am trying to do make a cutscene that will switch between 2 different cameras. I want to be able to cut to different cameras durring the cutscene. I tried using SetCameraFocus(0, cam1); but whenever I try to add a camera to the cog it quits working all together.
This is one the the things i tried.

Code:
symbols

message		activated

thing		console	
thing		cam
thing		cam1


flex		speed=2.0
flex		wait=5.0
sound       	playsnd=Accomplish1.wav

int		done=0				local
sound           NotifySnd=beep1.wav		local
int		Player				local
int		check				local

end

code

activated:


if (done ==0)
	{
	
	check = GetSenderRef();
	if (check == console)
		{
		
		Player = GetLocalPlayerThing();

		
		SetActorFlags(Player, 0xa00000);
		
		StopThing(Player);

		
		SetCameraFocus(0, cam);
		SetCurrentCamera(0);




		Sleep(1);
		PlaySoundLocal(NotifySnd, 1, 0, 132);
		Print(">> Whats up kenny <<");
		

              //this is the code i added
                SetCameraFocus(0, cam1); 
                SetCurrentCamera(0);
                   

                Sleep(2);
		PlaySoundLocal(NotifySnd, 1, 0, 132);
		Print("Hey.....IS that hector?!?!?");
		
               
                 
		Sleep(wait);

		
		if (jkGetSaberCam() == 1)
		CycleCamera();
		DestroyThing(cam);

		
		ClearActorFlags(Player, 0xa00000);

		done =1;
		}
	}
else
	{
	
	PlaySoundLocal(NotifySnd, 1, 0, 132);
	Print("I couldn't eat another Big Mac!");
	}
return;

end


FYI this is antony's cutscene cog i am editing.

Thanks for the help
2006-02-26, 4:59 PM #4
Your syntax looks good, but you're not setting the camera focus back to the player. You're saying nothing happens when you use this cog? The camera doesn't change, and there's no text coming up?
Historians are the most powerful and dangerous members of any society. They must be watched carefully... They can spoil everything. - Nikita Khrushchev.
Kill one man, and you are a murderer. Kill millions of men, and you are a conqueror. Kill them all, and you are a god. - Jean Rostand.
2006-02-26, 6:43 PM #5
OK, when i use this cog it goes to the first camera and displays the text but it won't switch to the second camera.
2006-02-26, 7:43 PM #6
I also tryed to switch the camera back to player at the end but that doesn't work either. I know I'v got to be missing something somewhere. I've looked at jk specs and other cogs and the cutscene tutorials yet the answer continues to escape me.
It's about enough to drive you batty. :confused:
2006-02-26, 10:54 PM #7
Well if the switch to cam worked and the switch to cam1 didn't, I'd guess that either the cam1 object is not in the level or it's not being passed to the cog. Your code looks fine.

This section on passing from a JKL might be useful, but chances are you're using JED and in that case you'd be using its interface.
Historians are the most powerful and dangerous members of any society. They must be watched carefully... They can spoil everything. - Nikita Khrushchev.
Kill one man, and you are a murderer. Kill millions of men, and you are a conqueror. Kill them all, and you are a god. - Jean Rostand.
2006-02-27, 1:19 PM #8
Well I got it working, now how do i change the camera Back to player?
Deos it have anything to do with this?
Code:
if (jkGetSaberCam() == 1)
		CycleCamera();
		DestroyThing(cam);


Anyway thanks for the help Centrist. I used to hang around these forums a few years ago. seems to have slowed down a bit around here, but Im glad to see there's still a few people helping each other out.
2006-02-27, 1:28 PM #9
CycleCamera() changes from internal to external or vice versa depending on which one you're using. SetCameraFocus() changes the object that the camera is looking from. So SetCameraFocus(0, Player); should do what you need. Use that before DestroyThing(cam1);
Historians are the most powerful and dangerous members of any society. They must be watched carefully... They can spoil everything. - Nikita Khrushchev.
Kill one man, and you are a murderer. Kill millions of men, and you are a conqueror. Kill them all, and you are a god. - Jean Rostand.
2006-02-27, 1:32 PM #10
You know what I figured it out right before you posted. :rolleyes:

Thanks bro
2006-02-27, 3:34 PM #11
No problem. ;)
Historians are the most powerful and dangerous members of any society. They must be watched carefully... They can spoil everything. - Nikita Khrushchev.
Kill one man, and you are a murderer. Kill millions of men, and you are a conqueror. Kill them all, and you are a god. - Jean Rostand.

↑ Up to the top!