PDA

View Full Version : It ends the episode!



Wolfy
06-26-2002, 07:53 PM
# Jedi Knight Cog Script
#
# filename.cog
#
# Description
#
#
# This Cog is Not supported by LucasArts Entertainment Co

symbols

message startup
thing cookedhaggis
thing playeractor
thing playerlook
thing lieutenant
thing console5
thing cam1
thing cam2
surface consoleface
key suxbad=kyusew0.key local
material switch=planetboard.mat local
material kahn=kahnscreen.mat local
material barkeep=barkeep.mat local
sound beep=beep1.wav local
sound beep2=beep2.wav local

end

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

code

startup:
Player = GetLocalPlayerThing();
SetActorFlags(player, 0xa00000);
StopThing(player);
SetCameraFocus(0, cam1);
Sleep(2.0);
MoveToFrame(cam1, 1, 5);
Sleep(2.0);
Print("COOKEDHAGGIS: Thank you for coming on such short notice.");
Sleep(2.0);
Print("COOKEDHAGGIS: We've analyzed the data you brought back from Planet 9...");
Sleep(5.0);
Print("COOKEDHAGGIS: ...and have discovered that there is a secret Imperial facility on Dangoon IV.");
Sleep(2.0);
AiSetLookPos(cookedhaggis, GetThingPos(lieutenant));
Sleep(2.0);
SetCameraFocus(0, cam2);
Print("COOKEDHAGGIS: Lieutenant?");
Sleep(1.0);
AiSetLookPos(lieutenant, GetThingPos(console5));
Sleep(1.0);
PlaySoundLocal(beep, 1, 0.0, 0x0);
Sleep(0.5);
AiSetLookPos(playeractor, GetThingPos(playerlook));
MoveToFrame(cam2, 1, 3);
Sleep(4.0);
PlaySoundLocal(beep2, 1, 0.0, 0x0);
SetSurfaceMat(consoleface, switch);
Sleep(2.0);
Print("COOKEDHAGGIS: The only major city is Ans.");
Sleep(4.0);
PlaySoundLocal(beep2, 1, 0.0, 0x0);
SetSurfaceMat(consoleface, kahn);
Print("COOKEDHAGGIS: We have reason to believe access is at a 'Kahn's Books.'");
Sleep(5.0);
PlaySoundLocal(beep2, 1, 0.0, 0x0);
SetSurfaceMat(consoleface, barkeep);
Print("COOKEDHAGGIS: Meet our contact at the local bar; he'll give you the password to get in.");
Sleep(5.0);
Print("COOKEDHAGGIS: Good luck, and the may the Force be with you.");
Sleep(3.0);
jkEndLevel();
return;

# .................................................. ......................................

end

It does everything fine, except that after the "may the Force be with you" line, it goes back to the JK main menu, as though I've told it to be the end of the episode.

I've re-written the episode.jk file. I've set jkEndLevel to 1 and 0. Why is it closing the episode?!

------------------
"Do you have any idea how long it takes to dig graves for twenty-three oak trees?"
-- Davram Bashere, The Fires Of Heaven
"She shall make you a real boy, and I shall make her a real woman."
-- Joe, A.I.
NMGOH (http://www.nmgoh.com)

Descent_pilot
06-26-2002, 08:48 PM
jkEndLevel(int); - int as 1 goes to the A line number in the Episode, int as 0 does B instead. The problem has to be in the Episode. Post that and I'll check it over.

------------------
The Sniper Missions. Current project, The Sniper Missions

gbk
06-27-2002, 07:42 AM
No, the problem IS 'JKendlevel()'... You need to but a 1 or 0 in there.

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources (http://www.tbns.net/GBK/ol/index.htm).

Descent_pilot
06-27-2002, 09:32 AM
Wolfy tried that.
<font face="Verdana, Arial" size="2">I've set jkEndLevel to 1 and 0.</font> I bet the problem is in the episode.

------------------
The Sniper Missions. Current project, The Sniper Missions

Wolfy
06-27-2002, 09:37 AM
I fixed it.

I realized I was running the level in debug mode, and that goes back to the JK main menu when you finish a level.

http://forums.massassi.net/html/redface.gif

------------------
"Do you have any idea how long it takes to dig graves for twenty-three oak trees?"
-- Davram Bashere, The Fires Of Heaven
"She shall make you a real boy, and I shall make her a real woman."
-- Joe, A.I.
NMGOH (http://www.nmgoh.com)

Descent_pilot
06-27-2002, 09:50 AM
Yep, that'll do it.

------------------
The Sniper Missions. Current project, The Sniper Missions

gbk
06-27-2002, 10:13 AM
Oops, sorry.

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources (http://www.tbns.net/GBK/ol/index.htm).

SaberMaster
06-27-2002, 12:40 PM
As for the cog, "key" should be "keyframe" in the symbols, and player is undefined.

Good luck, Wolfy. http://forums.massassi.net/html/wink.gif

------------------
Author of the JK DataMaster (http://www.geocities.com/sabersdomain/fileframe.html), Parsec (http://www.geocities.com/sabersdomain/fileframe.html), and the EditPlus Cog Files (http://www.geocities.com/sabersdomain/fileframe.html).
Visit Saber's Domain (http://www.geocities.com/sabersdomain).

[This message has been edited by SaberMaster (edited June 27, 2002).]

[This message has been edited by SaberMaster (edited June 27, 2002).]

Descent_pilot
06-27-2002, 12:58 PM
SaberMaster, here's a part from JK's default episode.
150: 2 15 CUT 39a.smk 0 0 151 -1
151: 2 15 LEVEL 16aEscapeShip.jkl 0 0 160 152 # Level 15: Escape Ship
152: 2 15 CUT 41da.smk 0 0 150 -1
This is the lightside path. If you fail the mission, it plays the failed cutscene. If you complete it, you watch the next level's cutscene. The same is true for the darkside. I bet you're thinking of DECIDE lines. Those will send you off to A or B depending on if your light or dark.

------------------
The Sniper Missions. Current project, The Sniper Missions

[This message has been edited by Descent_pilot (edited June 27, 2002).]

SaberMaster
06-27-2002, 06:14 PM
Yes, I was thinking of decide levels, but then again, I'm not a level editor. http://forums.massassi.net/html/smile.gif

------------------
Author of the JK DataMaster (http://www.geocities.com/sabersdomain/fileframe.html), Parsec (http://www.geocities.com/sabersdomain/fileframe.html), and the EditPlus Cog Files (http://www.geocities.com/sabersdomain/fileframe.html).
Visit Saber's Domain (http://www.geocities.com/sabersdomain).

Lord_Grismath
06-29-2002, 09:01 AM
Whoa, wait: seeing the GotoA and GotoB...

HOW WOULD YOU MAKE ALTERNATE ENDINGS (that lead to alternate levels)?!?!

(and can it be dont for MotS? http://forums.massassi.net/html/tongue.gif)

Descent_pilot
06-29-2002, 01:07 PM
Not sure about MotS, but see JK's default episode. use the same sort of thing as posted above Grismath.

------------------
The Sniper Missions. Current project, The Sniper Missions

Lord_Grismath
07-01-2002, 04:26 AM
Yes, but what would the command be to differentiate between the 'path' the player has chosen?

Descent_pilot
07-01-2002, 06:37 AM
Read my first reply, http://forums.massassi.net/html/rolleyes.gif Then read my fourth post, the one with the episode.

------------------
The Sniper Missions. Current project, The Sniper Missions

Lord_Grismath
07-03-2002, 03:59 AM
Ohhhhhhhh...

Thus, it would be jkEndLevel(1); for GotoA, and jkEndLevel(0); for GotoB?

Descent_pilot
07-03-2002, 06:56 AM
Yes Grismath. Now let this vanish into the dead topics.

------------------
The Sniper Missions. Current project, The Sniper Missions