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