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 → I need some help guys.
I need some help guys.
2003-06-27, 8:29 AM #1
So I'm working on a cutscene cog and it works, but then I added some stuff to it and it doesn't work now. All I added was like some print and sleep stuff. I checked the cog a couple of times and could not find one problem. Maybe you can point something out.

First one(The working one):

# Jedi Knight Cog Script
# This file is not made or supported by LucasArts Entertainment Co.
# Opening cutscene for AoIO 21-B
# Written by Michael Kyle
# =============================================

symbols
message startup
thing cam
thing cam1
thing cam2
thing cam3
thing cam4
thing cam5
thing ghost
thing ghost1
thing ghost2
thing ghost3
thing ghost4
thing dartanius
thing recommander
thing ewing
thing othership
thing player local
keyframe scratch=ro_scratch.key local
int talking local
sound beepsnd=beep1.wav local
end
# ============================================

code

startup:
player = GetLocalPlayerThing();
SetActorFlags(player, 0xa00000);
StopThing(player);
playsong(8, 8, 8);
jkBeginCutscene();
SetCameraFocus(0, cam);
SetCurrentCamera(0);
MoveToFrame(ewing, 1, 10);
MoveToFrame(ewing, 2, 10);
MoveToFrame(ewing, 3, 10);
sleep(8.0);
SetCameraFocus(0, cam1);
sleep(5.0);
SetCameraFocus(0, cam2);
TeleportThing(dartanius, ghost);
sleep(1.0);
AISetLookPos(dartanius, GetThingPos(ghost1));
AISetMoveSpeed(1.0);
AISetMoveThing(dartanius, ghost1);
sleep(1.0);
MoveToFrame(cam2, 1, 10);
MoveToFrame(cam2, 2, 10);
sleep(1.0);
SetCameraFocus(0, cam3);
sleep(0.5);
MoveToFrame(door, 1, 5);
AISetLookPos(dartanius, GetThingPos(ghost2));
AISetMoveThing(dartanius, ghost2);
sleep(2.0);
MoveToFrame(door, 2, 5);
sleep(2.0);
AISetLookPos(dartanius, GetThingPos(recommander));
AISetMoveThing(dartanius, ghost3);
sleep(0.5);
AISetLookPos(recommander, GetThingPos(dartanius));
AISetMoveSpeed(1.0);
AISetMoveThing(recommander, ghost4);
sleep(2.0);
SetCameraFocus(0, cam4);
AISetLookPos(dartanius, GetThingPos(recommander));
sleep(1.5);
playsoundlocal(beepsnd, 3, 0, 0x0);
print("Commander: Captain Dartanius. I see you evacuated the spaceport safely.");
sleep(2.0);
playsoundlocal(beepsnd, 3, 0, 0x0);
print("Commander: It is a shame we lost that spaceport!");
sleep(2.0);
SetCameraFocus(0, cam5);
sleep(0.5);
playsoundlocal(beepsnd, 3, 0, 0x0);
print("Captain Dartanius: Indeed it is. We need to strike back at the empire and let them know who we really are!");
sleep(3.0);
SetCameraFocus(0, cam4);
sleep(0.5);
playsoundlocal(beepsnd, 3, 0, 0x0);
print("Commander: Not to worry. A plan has already been formulated.");
sleep(2.5);
playsoundlocal(beepsnd, 3, 0, 0x0);
print("Commander: Intel suggest that the Imperials have an oupost on Hoth.");
sleep(2.0);
playsoundlocal(beepsnd, 3, 0, 0x0);
print("Commander: We need a man to destroy the generator so are men can begin the assaut easier.");
sleep(2.0);
playsoundlocal(beepsnd, 3, 0, 0x0);
print("Commander: Hmm?");
talking=playkey(recommander, scratch, 1, 0x4);
sleep(7.5);
stopkey(recommander, talking, 0);
jkEndLevel();
return;
# ..........................................
end

The Second One(doesn't work):

# Jedi Knight Cog Script
# This file is not made or supported by LucasArts Entertainment Co.
# Opening cutscene for AoIO 21-B
# Written by Michael Kyle
# =============================================

symbols
message startup
thing cam
thing cam1
thing cam2
thing cam3
thing cam4
thing cam5
thing ghost
thing ghost1
thing ghost2
thing ghost3
thing ghost4
thing dartanius
thing recommander
thing ewing
thing othership
thing player local
keyframe scratch=ro_scratch.key local
int talking local
sound beepsnd=beep1.wav local
end
# ============================================

code

startup:
player = GetLocalPlayerThing();
SetActorFlags(player, 0xa00000);
StopThing(player);
playsong(8, 8, 8);
jkBeginCutscene();
SetCameraFocus(0, cam);
SetCurrentCamera(0);
MoveToFrame(ewing, 1, 10);
MoveToFrame(ewing, 2, 10);
MoveToFrame(ewing, 3, 10);
sleep(8.0);
SetCameraFocus(0, cam1);
sleep(5.0);
SetCameraFocus(0, cam2);
TeleportThing(dartanius, ghost);
sleep(1.0);
AISetLookPos(dartanius, GetThingPos(ghost1));
AISetMoveSpeed(1.0);
AISetMoveThing(dartanius, ghost1);
sleep(1.0);
MoveToFrame(cam2, 1, 10);
MoveToFrame(cam2, 2, 10);
sleep(1.0);
SetCameraFocus(0, cam3);
sleep(0.5);
MoveToFrame(door, 1, 5);
AISetLookPos(dartanius, GetThingPos(ghost2));
AISetMoveThing(dartanius, ghost2);
sleep(2.0);
MoveToFrame(door, 2, 5);
sleep(2.0);
AISetLookPos(dartanius, GetThingPos(recommander));
AISetMoveThing(dartanius, ghost3);
sleep(0.5);
AISetLookPos(recommander, GetThingPos(dartanius));
AISetMoveSpeed(1.0);
AISetMoveThing(recommander, ghost4);
sleep(2.0);
SetCameraFocus(0, cam4);
AISetLookPos(dartanius, GetThingPos(recommander));
sleep(1.5);
playsoundlocal(beepsnd, 3, 0, 0x0);
print("Commander: Captain Dartanius. I see you evacuated the spaceport safely.");
sleep(2.0);
playsoundlocal(beepsnd, 3, 0, 0x0);
print("Commander: It is a shame we lost that spaceport!");
sleep(2.0);
SetCameraFocus(0, cam5);
sleep(0.5);
playsoundlocal(beepsnd, 3, 0, 0x0);
print("Captain Dartanius: Indeed it is. We need to strike back at the empire and let them know who we really are!");
sleep(3.0);
SetCameraFocus(0, cam4);
sleep(0.5);
playsoundlocal(beepsnd, 3, 0, 0x0);
print("Commander: Not to worry. A plan has already been formulated.");
sleep(2.5);
playsoundlocal(beepsnd, 3, 0, 0x0);
print("Commander: Intel suggest that the Imperials have an oupost on Hoth.");
sleep(2.0);
playsoundlocal(beepsnd, 3, 0, 0x0);
print("Commander: We need a man to destroy the generator so are men can begin the assaut easier.");
sleep(2.0);
playsoundlocal(beepsnd, 3, 0, 0x0);
print("Commander: Hmm?");
talking=playkey(recommander, scratch, 1, 0x4);
sleep(7.5);
stopkey(recommander, talking, 0);
print("Commander: I think you would be the right man for the job.);
sleep(2.0);
SetCameraFocus(0, cam5);
sleep(0.5);
playsoundlocal(beepsnd, 3, 0, 0x0);
print("Captain Dartanius: Me?!?");
sleep(1.5);
SetCameraFocus(0, cam4);
sleep(0.5);
playsoundlocal(beepsnd, 3, 0, 0x0);
print("Commander: Well, I figured since you did such a great job with the spaceport evacuation, then you won't let me down here.");
sleep(3.0);
playsoundlocal(beepsnd, 3, 0, 0x0);
print("Commander: I'll even give you your own one man spacecraft.");
sleep(2.0);
SetCameraFocus(0, cam5);
sleep(0.5);
playsoundlocal(beepsnd, 3, 0, 0x0);
print("Captain Dartanius: Ok, I will do it, but only because it is for the good of the Rebellion.");
sleep(2.0);
jkEndLevel();
return;
# ..........................................
end

I dont know why. Please try to figure something out.

------------------
<MyseriousSith>(michael_kyle)
2003-06-27, 8:47 AM #2
A few things I noticed, AISetMoveSpeed(1.0); doesn't define an actor. It should be AISetMoveSpeed(actor, flex_speed); *From the Datamaster*

Also, door isn't defined in the symbols section.
You forgot the ending " in Print("Commander: I think you would be the right man for the job.);.

That's all I can see from it, I ran it through Parsec and it said pretty much all the stuff I just said, and it said jkbegincutscene() was wrong, but that's because it's MotS, and it said something about "expected parameters for the verb ,jkendlevel, on line 122." whatever that means.

------------------
Look for my current project, The Force in Your Soul.
Last week I cudn't evn spel grajuat, but now I is one.

*Takes out his blaster and fires shots at the wall, the blastmarks leave the words "S-TROOPER WUZ 'ERE!!!"
2003-06-27, 8:50 AM #3
Thanks this should work. Weird about the door cause it still opens when its supposed to. Thanks again though.

------------------
<MyseriousSith>(michael_kyle)
2003-06-27, 8:58 AM #4
Yes just tried it out and it worked. The problem was in that print thing. Thanks for pointing it out.

------------------
<MyseriousSith>(michael_kyle)
2003-06-27, 11:06 AM #5
No problem. [http://forums.massassi.net/html/smile.gif]

------------------
Look for my current project, The Force in Your Soul.
Last week I cudn't evn spel grajuat, but now I is one.

*Takes out his blaster and fires shots at the wall, the blastmarks leave the words "S-TROOPER WUZ 'ERE!!!"
2003-06-27, 3:55 PM #6
Quote:
<font face="Verdana, Arial" size="2">Originally posted by Stormtrooper:

and it said something about "expected parameters for the verb ,jkendlevel, on line 122."</font>[/quote]That's because jkEndLevel should have a 0 or 1 in the parentheses, indicating whether to go to the next level, or repeat the level. It automatically goes to the next if nothing's there, though, so it works with nothing. Acts like a 1 is there, I guess.

------------------
"The Just shall live by faith." - Galatians 3:11
To edit is human... To COG is divine!!

pegasus_1984: Stop bushing that dang suck button.
guitarofgold: NOOOOOOOOO!!!!
-------[end post]-------
Catloaf, meet mouseloaf.
My music
2003-06-27, 4:46 PM #7
okay, 0 = goto level B, 1 = goto level A. Also, as a warning to all...

Use code tags!!

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

The Magician Saber System.

The 2 riddle!
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2003-06-27, 5:38 PM #8
I usually don't use code tags because nobody usually see's my cogs.

------------------
<MyseriousSith>(michael_kyle)

↑ Up to the top!