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 → edited "tutorial" cog will not work, very easy, please help
edited "tutorial" cog will not work, very easy, please help
2001-05-05, 12:14 PM #1
symbols
message entered
thing cam
sector entersector
thing player local
flex speed=2.0
sound goalsnd=kk60058.wav local
int done=0 local
sound SoundToPlay=gatetravel_sg1.wav local
int Player local
int check local

end

code
entered:

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

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

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

Sleep(2.0);
PlaySoundLocal(SoundToPlay, 1, 0, 132);
Print("I love this bit!!!");

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(3.5);
PlaySoundLocal(SoundToPlay, 1, 0, 132);
Print(">> This is your first Cutscene sound <<");

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

It WAS for when the play activated a console, I changed it for entering a sector,
but it didnt work.
Why?
Code:
if(getThingFlags(source) & 0x8){
  do her}
elseif(getThingFlags(source) & 0x4){
  do other babe}
else{
  do a dude}
2001-05-07, 8:36 AM #2
Here's what I would try. Use a linkid=1 for the entersector and get rid of "check" variable. Add "done = 1" to prevent cog from running a second time. The last IF statement is missing brackets -- I just guessed where they went, so you need to fix this.

There is both a "thing player local" and a "int Player local". I got rid of the second.
As for the rest of the code, I'm not sure, I've been having trouble myself with camera cogs.
Code:
symbols
message entered
thing cam
sector entersector linkid=1
thing Player local
flex speed=2.0
sound goalsnd=kk60058.wav local
int done=0 local
sound SoundToPlay=gatetravel_sg1.wav local
end

code
entered:

if ((done ==0) && (GetSenderId == 1))
{
done = 1;
Player = GetLocalPlayerThing();

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

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

Sleep(2.0);
PlaySoundLocal(SoundToPlay, 1, 0, 132);
Print("I love this bit!!!");

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(3.5);
PlaySoundLocal(SoundToPlay, 1, 0, 132);
Print(">> This is your first Cutscene sound <<");

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


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

[This message has been edited by Sylvicolus (edited May 07, 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

↑ Up to the top!