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 → my first doodle in cogs AND cutscenes
my first doodle in cogs AND cutscenes
2001-01-18, 2:47 PM #1
no, not really a cutscene, but a camera movement...
after it goes "It is kyle!" the camera moves in too slow. i just adjusted the tuorial's cog really, but whatever:

--------------------------------------------------------------------------------
Code:
symbols
message		activated
thing		cam
thing		console	
thing 		player				local
flex		speed=2.0
flex		speed2=14.0
sound       	goalsnd=kk60058.wav         local
int		done=0				local
sound           SoundToPlay=forceblind01.wav		local
int		Player				local
int		check				local

end

code
activated:

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

		// freeze Kyle
		SetActorFlags(Player, 0xa00000);
		StopThing(Player);
		
		SetCameraFocus(0, cam);
		SetCurrentCamera(0);

		Sleep(2.0);
		Print("who is it?");

		MoveToFrame(cam, 1, speed);
	       MoveToFrame(cam, 2, speed);
	       MoveToFrame(cam, 3, speed);
	       MoveToFrame(cam, 4, speed);
	       MoveToFrame(cam, 5, speed);
	       MoveToFrame(cam, 6, speed);
	       MoveToFrame(cam, 7, speed);
	       MoveToFrame(cam, 8, speed);
	       MoveToFrame(cam, 9, speed);
		
		Sleep(24.5);
		PlaySoundLocal(SoundToPlay, 1, 0, 132);
		Print("IT IS KYLE!");

	       MoveToFrame(cam, 10, speed2);	

		Sleep(22.0);
		SetCameraFocus(0, jkGetLocalPlayer());

		if (jkGetSaberCam() == 1)
		CycleCamera();
		DestroyThing(cam);
		
		// unfreeze's Kyle
		ClearActorFlags(Player, 0xa00000);

	   	PlaySoundLocal(goalsnd, 1, 0, 0);
		Print("The End of your first Cutscene");
		SetGoalFlags(Player, 1, 2);
	   	SetGoalFlags(Player, 2, 1);

		}
	}

	return;

end


--------------------------------------------------------------------------------


------------------
|}3773|2 4n[) 13373r

[This message has been edited by DaFan (edited January 18, 2001).]
[Hideki - Scrolls too much]

[This message has been edited by Hideki (edited January 29, 2001).]
2001-01-18, 2:55 PM #2
oh yeah, and how do you make a cutsceen start right when a level does?
2001-01-18, 5:10 PM #3
Ok, i modified it even more for my REAL level and it wont start when i touch the concle.
--------------------------------------------------------------------------------
Code:
symbols
message		activated
thing		cam
thing		cam2
thing		maraship
thing		console	
thing 		player				local
flex		speed=2.0
flex		speed2=2.0
sound       	goalsnd=kk60058.wav         local
int		done=0				local
sound           SoundToPlay=forceblind01.wav		local
int		Player				local
int		check				local

end

code
activated:

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

		// freeze Kyle
		SetActorFlags(Player, 0xa00000);
		StopThing(Player);
		
		SetCameraFocus(0, cam);
		SetCurrentCamera(0);

		MoveToFrame(cam, 1, speed);
	       MoveToFrame(cam, 2, speed);
	       MoveToFrame(cam, 3, speed);
		Print("Mark:make this quick");
		Sleep(3.0);
	       MoveToFrame(cam, 4, speed);
	       MoveToFrame(cam, 5, speed);
	       MoveToFrame(cam, 6, speed);
		Print("Brain: yeah, kyle said there were 
		Print("imperals around");
		Sleep(6.5);
	       MoveToFrame(cam, 7, speed);
	       MoveToFrame(cam, 8, speed);
	       MoveToFrame(cam, 9, speed);
	        Print("Mara: don't worry, i just got this new ship");
	        Print("And i need to break it in.");
		Sleep(6.0);
		SetCameraFocus(0, cam2);
		SetCurrentCamera(0);
		MoveToFrame(maraship, 1, speed);
		MoveToFrame(maraship, 2, speed);
		MoveToFrame(maraship, 3, speed);
		MoveToFrame(maraship, 4, speed);
		MoveToFrame(maraship, 5, speed);
		MoveToFrame(maraship, 6, speed);
	        Print("Mara:Yahoo!");
		MoveToFrame(maraship, 7, speed);
		MoveToFrame(maraship, 8, speed);
		MoveToFrame(maraship, 9, speed);
		MoveToFrame(maraship, 10, speed);
		MoveToFrame(maraship, 11, speed);
		MoveToFrame(maraship, 1, speed);
		SetCameraFocus(0, jkGetLocalPlayer());

		if (jkGetSaberCam() == 1)
		CycleCamera();
		DestroyThing(cam);
		
		// unfreeze's Kyle
		ClearActorFlags(Player, 0xa00000);

	   	PlaySoundLocal(goalsnd, 1, 0, 0);
		Print("Mark:Im glad thats over, no i need to get out of here.");
		SetGoalFlags(Player, 1, 2);
	   	SetGoalFlags(Player, 2, 1);

		}
	}

	return;

end

--------------------------------------------
in case your woundering, maras doing a loop-de-loop
[Hideki - ditto]

[This message has been edited by Hideki (edited January 29, 2001).]
2001-01-19, 6:56 AM #4
My guess why the cog doesn't work is that the third IF statement near the bottom doesn't have a beginning bracket { or end bracket }
You also need to balance out the start and end brackets to determine how the if statements are nested within each other. Hope that helps.
----------------------
I think to have a cutscene start when a level does you call the cutscene cog from the startup cog.

------------------
If I have ever made any valuable discoveries, it has been owing more to
patient observation than to any other reason. -Isaac Newton

[This message has been edited by Sylvicolus (edited January 19, 2001).]
Sylvicolus JK homepage
If I have ever made any valuable discoveries, it has been owing more to
patient observation than to any other reason. -Isaac Newton
2001-01-19, 7:46 AM #5
how would that look? and how would i call it from the startup cog?
2001-01-20, 2:24 PM #6
*cough*
2001-01-21, 8:51 AM #7
Just put

message startup

under the symbols, and for the code, have it say

code
startup:
2001-01-21, 1:05 PM #8
would that look like:

symbols
thing cam
thing cam2
thing maraship
thing player local
flex speed=2.0
flex speed2=2.0
sound goalsnd=kk60058.wav local
int done=0 local
sound SoundToPlay=forceblind01.wav local
int Player local
int check local
message startup
end
code
startup:

or

symbols
message startup
thing cam
thing cam2
thing maraship
thing player local
flex speed=2.0
flex speed2=2.0
sound goalsnd=kk60058.wav local
int done=0 local
sound SoundToPlay=forceblind01.wav local
int Player local
int check local
end

code
startup:

------------------
|}3773|2 4n[) 13373r
2001-01-21, 2:41 PM #9
2nd one...

I don't think it matters, but I always put my messages first.

Demon_Nightmare
2001-01-21, 5:01 PM #10
well, its not working
2001-01-24, 3:22 PM #11
*cough* if no one can help me, wheres a good place to learn cogs?
2001-01-25, 5:14 AM #12
Change "activated" to "startup" both in the symbols and the code.

And also put

Sleep(1);

just below

"startup:" (after you replace)

------------------
http://millennium.massassi.net/ - Millennium
2001-01-25, 6:43 AM #13
the line - Print("Brain: yeah, kyle said there were - doesnt seem to be finished... dont no if you knew that or not.


------------------
htttp://www.spam.com

[url="mailto:connorthegreat@earthlink.net"]mailto:connorthegreat@earthlink.net[/url]connorthegreat@earthlink.net</A>

[This message has been edited by ConnorTheGreat1 (edited January 25, 2001).]

[This message has been edited by ConnorTheGreat1 (edited January 25, 2001).]
htttp://www.spam.com

mailto:connorthegreat@earthlink.netconnorthegreat@earthlink.net</A>
2001-01-26, 6:39 AM #14
heres what I got:

Code:
symbols
thing		cam
thing		cam2
thing		maraship
thing 		player				local
flex		speed=2.0
flex		speed2=2.0
sound       	goalsnd=kk60058.wav         local
int		done=0				local
sound           SoundToPlay=forceblind01.wav		local
int		Player				local
int		check				local
message		startup
end

code
startup:
sleep(1);

		Player = GetLocalPlayerThing();

		// freeze Kyle
		SetActorFlags(Player, 0xa00000);
		StopThing(Player);
		
		SetCameraFocus(0, cam);
		SetCurrentCamera(0);

		MoveToFrame(cam, 1, speed);
	       MoveToFrame(cam, 2, speed);
	       MoveToFrame(cam, 3, speed);
		Print("Mark:make this quick");
		Sleep(3.0);
	       MoveToFrame(cam, 4, speed);
	       MoveToFrame(cam, 5, speed);
	       MoveToFrame(cam, 6, speed);
		Print("Brain: yeah, kyle said there were") 
		Print("imperals around");
		Sleep(6.5);
	       MoveToFrame(cam, 7, speed);
	       MoveToFrame(cam, 8, speed);
	       MoveToFrame(cam, 9, speed);
	        Print("Mara: don't worry, i just got this new ship");
	        Print("And i need to break it in.");
		Sleep(6.0);
		SetCameraFocus(0, cam2);
		SetCurrentCamera(0);
		MoveToFrame(maraship, 1, speed2);
		MoveToFrame(maraship, 2, speed2);
		MoveToFrame(maraship, 3, speed2);
		MoveToFrame(maraship, 4, speed2);
		MoveToFrame(maraship, 5, speed2);
		MoveToFrame(maraship, 6, speed2);
	        Print("Mara:Yahoo!");
		MoveToFrame(maraship, 7, speed2);
		MoveToFrame(maraship, 8, speed2);
		MoveToFrame(maraship, 9, speed2);
		MoveToFrame(maraship, 10, speed2);
		MoveToFrame(maraship, 11, speed2);
		MoveToFrame(maraship, 1, speed2);
		SetCameraFocus(0, jkGetLocalPlayer());

		if (jkGetSaberCam() == 1)
			{
	                CycleCamera();
			DestroyThing(cam);
			}		
		// unfreeze's Kyle
		ClearActorFlags(Player, 0xa00000);

	   	PlaySoundLocal(goalsnd, 1, 0, 0);
		Print("I'm glad that's over!");
		Print("Now I need to get out of here.");
		SetGoalFlags(Player, 1, 2);
	   	SetGoalFlags(Player, 2, 1);

		
	

	return;

end


whats wrong?!
2001-01-26, 7:15 AM #15
Code:
symbols
thing cam
thing cam2
thing maraship
thing player local
flex speed=2.0
flex speed2=2.0
sound goalsnd=kk60058.wav local
int done=0 local
sound SoundToPlay=forceblind01.wav local
int Player local
int check local
message startup
end
code
startup:
sleep(1);
Player = GetLocalPlayerThing();
// freeze Kyle
SetActorFlags(Player, 0xa00000);
StopThing(Player);

SetCameraFocus(0, cam);
SetCurrentCamera(0);
MoveToFrame(cam, 1, speed);
MoveToFrame(cam, 2, speed);
MoveToFrame(cam, 3, speed);
Print("Mark:make this quick");
Sleep(3.0);
MoveToFrame(cam, 4, speed);
MoveToFrame(cam, 5, speed);
MoveToFrame(cam, 6, speed);
Print("Brain: yeah, kyle said there were"); // you didn't have the semi-colon
Print("imperals around");
Sleep(6.5);
MoveToFrame(cam, 7, speed);
MoveToFrame(cam, 8, speed);
MoveToFrame(cam, 9, speed);
Print("Mara: don't worry, i just got this new ship");
Print("And i need to break it in.");
Sleep(6.0);
SetCameraFocus(0, cam2);
SetCurrentCamera(0);
MoveToFrame(maraship, 1, speed2);
MoveToFrame(maraship, 2, speed2);
MoveToFrame(maraship, 3, speed2);
MoveToFrame(maraship, 4, speed2);
MoveToFrame(maraship, 5, speed2);
MoveToFrame(maraship, 6, speed2);
Print("Mara:Yahoo!");
MoveToFrame(maraship, 7, speed2);
MoveToFrame(maraship, 8, speed2);
MoveToFrame(maraship, 9, speed2);
MoveToFrame(maraship, 10, speed2);
MoveToFrame(maraship, 11, speed2);
MoveToFrame(maraship, 1, speed2);
SetCameraFocus(0, jkGetLocalPlayer());
if (jkGetSaberCam() == 1)
{
CycleCamera();
DestroyThing(cam);
} 
// unfreeze's Kyle
ClearActorFlags(Player, 0xa00000);
PlaySoundLocal(goalsnd, 1, 0, 0);
Print("I'm glad that's over!");
Print("Now I need to get out of here.");
SetGoalFlags(Player, 1, 2);
SetGoalFlags(Player, 2, 1);
return;
end

You missed a semi-colon. I marked it in bold.

Ok, bold doesn't work so well with code brackets, I put a comment next to it instead.
------------------
Together we stand.
Divided we fall.

[This message has been edited by Aglar (edited January 26, 2001).]
2001-01-26, 12:00 PM #16
Code:
symbols
thing        cam                                                              
thing        cam2                                                             
thing        cam3                                                             
thing        maraship                                                         
thing        markship                                                         
thing        brianship                                                        
thing        player                             local                         
flex         speed=2.0                                                        
flex         speed2=6.0                                                       
flex         speed3=100.0                                                     
int          done=0                             local                         
int          Player                             local                         
int          check                              local                         
message      startup                                                          
end                                                                           

code
startup:
sleep(.9);

		Player = GetLocalPlayerThing();

		// freeze Kyle
		SetActorFlags(Player, 0xa00000);
		StopThing(Player);
		
		SetCameraFocus(0, cam);
		SetCurrentCamera(0);

		MoveToFrame(cam, 1, speed);
	       MoveToFrame(cam, 2, speed);
	       MoveToFrame(cam, 3, speed);
		Sleep(9.0);
		Print("Mark:make this quick");
		Sleep(5.0);
	       MoveToFrame(cam, 4, speed);
	       MoveToFrame(cam, 5, speed);
	       MoveToFrame(cam, 6, speed);
		Print("Brain: yeah, kyle said there were");
		Print("imperals around");
		Sleep(5.5);
	       MoveToFrame(cam, 7, speed);
	       MoveToFrame(cam, 8, speed);
	       MoveToFrame(cam, 9, speed);
	        Print("Mara: don't worry, i just got this new ship");
	        Print("And i need to break it in.");
		Sleep(7.0);
		SetCameraFocus(0, cam2);
		SetCurrentCamera(0);
		MoveToFrame(destroyer1, 5, speed3);
		MoveToFrame(destroyer2, 5, speed3);
		MoveToFrame(maraship, 1, speed2);
	        Print("Mara:Yahoo!");
		MoveToFrame(maraship, 2, speed2);
		MoveToFrame(maraship, 3, speed2);
		MoveToFrame(maraship, 4, speed2);
		MoveToFrame(maraship, 5, speed2);
		MoveToFrame(maraship, 6, speed2);
		MoveToFrame(maraship, 7, speed2);
		Sleep(10.0);
		SetCameraFocus(0, cam3);
		SetCurrentCamera(0);
	        Print("Mara:What the--?"); #  Here's where it stops
		MoveToFrame(cam3, 2, speed2);
		MoveToFrame(cam3, 3, speed2);
		MoveToFrame(cam3, 4, speed2);
		MoveToFrame(cam3, 5, speed2);
		sleep(6.0);
		MoveToFrame(maraship, 8, speed2);
		MoveToFrame(markship, 2, speed2);
		MoveToFrame(brianship, 2, speed2);
	       Print("Mara: Mark, whats going on?");
		Pause(4.0);
		Print("Mark:What do you thinks going on!?");
		Pause(3.0);
		Print("Brian:We're being tractored in by the destroyer!");
				Pause(5.0);
		jkGetLocalPlayer();
		if (jkGetSaberCam() == 1)
			{
	                CycleCamera();
			DestroyThing(cam);
			}		
		// unfreeze's Kyle
		ClearActorFlags(Player, 0xa00000);
		Print("Mark:I'm glad that's over!");
		Print("Now I need to get out of here.");
		SetGoalFlags(Player, 1, 2);
	   	SetGoalFlags(Player, 2, 1);

		
	

	return;

end


It works up until it gets to cam 3 then it skips everything else in the cog.

also, after this goes, my internal veiw IS cam3 and it sees Mara's ship from its first position whick it shouldn't

help

[This message has been edited by DaFan (edited January 26, 2001).]
2001-01-29, 2:12 PM #17
*cough*

------------------
<A HREF="http://"http://www.geocities.com/dafan12345/mofive.wav" TARGET=_blank>/\/\3</A>

|}3773|2 4n[) 13373r
2001-01-29, 7:32 PM #18
Get CogWriter!
No signature for you.
2001-01-29, 8:51 PM #19
Try checking for syntax errors.

------------------
http://millennium.massassi.net/ - Millennium
2001-01-30, 2:17 PM #20
no syntax, i checked, nd if there were wouldn't it not run at all?

↑ Up to the top!