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 → Help for Dralloc Arena Cogs
Help for Dralloc Arena Cogs
2000-12-14, 9:02 AM #1
I am attempting to create a cutscene similar to the one found in level 7 when facing Yun. I modified the 07_RAHNLINES.cog to what I wanted it to do. I basically want to watch a quick pan of the arena before playing for the first time. I already made the KEY file, but I just need a cog that will play it right for me.

This is what I have. Please correct any mistakes I may have.

Code:
# BeefyKey.cog
# Opening Cutscene in Dralloc Arena
# You may use this cog for any opening cutscene in any level.
# (C) Beefy Productions 2000.

symbols

   message     startup
   thing       camera1
   sound       line1
   keyframe    keyfile
   
end

# =========================================================================================

code

startup:
      SetCurrentCamera(0);
      SetCameraFocus(0, camera1);
      PlayKey(camera1, keyfile, 1, 2);

      playerx = GetLocalPlayerThing();

      SetInv(playerx, 10, 1);
      jkSetFlags(playerx, 0x1);

      // Playerx starts with a saber
      SetInv(playerx, 1, 1.0);
      SetInv(playerx, 10, 1.0);

      // Initialize weapon.
      SetFireWait(playerx, -1);
      SetMountWait(playerx, 0);
      SetCurInvWeapon(playerx, 0);
      SelectWeapon(playerx, 10);

      SetActorFlags(playerx, 0xa00000);
      Sleep(2);
      PlaySoundLocal(line1, 1, 0, 0);
      ClearActorFlags(playerx, 0xa00000);
      SetCameraFocus(0, playerx);
      SetCurrentCamera(0);
      		// Go to external if sabercam is enabled.
		if (jkGetSaberCam() == 1)
			CycleCamera();
		
      DestroyThing(camera1);
      return;
end


Here's what I wanted. 1. Run through my KEY file to the end. 2. Sleep at the last position of the KEY for 2 seconds. 3. Begin normal opening sequence (Start at a WALKPLAYER position with a saber).

Can anyone give me an idea on how to make it work? It would be greatly appreciated! [http://forums.massassi.net/html/smile.gif]

------------------
BeefCaike - Creator Of The Most Anticipated Level Series For Jedi Knight! The Dralloc Series
2000-12-14, 10:21 AM #2
For the keyfile/sound, you'll need to do linel=linel.wav or whatever.. same with the keyfile.

-Jipe
2000-12-14, 11:08 AM #3
I don't understand what you mean. Could you be a little more specific? I am not very good with cogging. [http://forums.massassi.net/html/smile.gif]

------------------
BeefCaike - Creator Of The Most Anticipated Level Series For Jedi Knight! The Dralloc Series
2000-12-14, 5:21 PM #4
Couple things one you didn't define the playerx and on the if( jkGetSaberCam == 1)
you didn't have the { and } Should look like this
if (jkGetSaberCam() == 1)
{
CycleCamera();
DestroyThing(camera1);
}


------------------
Keith: "Perhaps there was an age in which people had Knowledge of Magic..."

[This message has been edited by Keith8_8000 (edited December 14, 2000).]
Keith: "Perhaps there was an age in which people had Knowledge of Magic..."
JK cogs
2000-12-14, 7:01 PM #5
# BeefyKey.cog
# Opening Cutscene in Dralloc Arena
# You may use this cog for any opening cutscene in any level.
# (C) Beefy Productions 2000.
symbols

message startup
thing camera1
sound line1=yourwav.wav
keyframe keyfile=yourkey.key

end

# =========================================================================================

code

startup:
SetCurrentCamera(0);
SetCameraFocus(0, camera1);
PlayKey(camera1, keyfile, 1, 2);

playerx = GetLocalPlayerThing();

SetInv(playerx, 10, 1);
jkSetFlags(playerx, 0x1);

// Playerx starts with a saber
SetInv(playerx, 1, 1.0);
SetInv(playerx, 10, 1.0);

// Initialize weapon.
SetFireWait(playerx, -1);
SetMountWait(playerx, 0);
SetCurInvWeapon(playerx, 0);
SelectWeapon(playerx, 10);

SetActorFlags(playerx, 0xa00000);
Sleep(2);
PlaySoundLocal(line1, 1, 0, 0);
ClearActorFlags(playerx, 0xa00000);
SetCameraFocus(0, playerx);
SetCurrentCamera(0);
// Go to external if sabercam is enabled.
if (jkGetSaberCam() == 1)
{
CycleCamera();

DestroyThing(camera1);
}
return;
end

In the symbols, change yourkey.key and yourwav.wav to their respective names. I have put in the brackets Keith suggested - also, Keith, playerx is defined early on as playerx = GetLocalPlayerThing(); - I missed it my first time, too [http://forums.massassi.net/html/smile.gif]

-Jipe
2000-12-18, 4:42 AM #6
Thanks a lot guys! I'll give 'er a shot! If all is well, expect Dralloc Arena to be on Massassi on the 20th! Ooooh, I can't wait! [http://forums.massassi.net/html/smile.gif]

------------------
BeefCaike - Creator Of The Most Anticipated Level Series For Jedi Knight! The Dralloc Series

↑ Up to the top!