PDA

View Full Version : my first doodle in cogs AND cutscenes



DaFan
01-18-2001, 05:47 PM
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:

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


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).]

DaFan
01-18-2001, 05:55 PM
oh yeah, and how do you make a cutsceen start right when a level does?

DaFan
01-18-2001, 08:10 PM
Ok, i modified it even more for my REAL level and it wont start when i touch the concle.
--------------------------------------------------------------------------------


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).]

Sylvicolus
01-19-2001, 09:56 AM
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).]

DaFan
01-19-2001, 10:46 AM
how would that look? and how would i call it from the startup cog?

llll
01-20-2001, 05:24 PM
*cough*

Demon_Nightmare
01-21-2001, 11:51 AM
Just put

message startup

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

code
startup:

DaFan
01-21-2001, 04:05 PM
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

Demon_Nightmare
01-21-2001, 05:41 PM
2nd one...

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

Demon_Nightmare

DaFan
01-21-2001, 08:01 PM
well, its not working

DaFan
01-24-2001, 06:22 PM
*cough* if no one can help me, wheres a good place to learn cogs?

Hideki
01-25-2001, 08:14 AM
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

ConnorTheGreat1
01-25-2001, 09:43 AM
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

mailto:connorthegreat@earthlink.netconnorthegreat@ 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).]

DaFan
01-26-2001, 09:39 AM
heres what I got:



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?!

Aglar
01-26-2001, 10:15 AM
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).]

DaFan
01-26-2001, 03:00 PM
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).]

DaFan
01-29-2001, 05:12 PM
*cough*

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

|}3773|2 4n[) 13373r

Gandalv the Gray
01-29-2001, 10:32 PM
Get CogWriter!

Hideki
01-29-2001, 11:51 PM
Try checking for syntax errors.

------------------
http://millennium.massassi.net/ - Millennium

DaFan
01-30-2001, 05:17 PM
no syntax, i checked, nd if there were wouldn't it not run at all?