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 → Cutscene Cog Question...
Cutscene Cog Question...
2002-05-25, 5:10 PM #1
Ok, i wrote out this cutscene, it starts, but jumps right to the last camera, the crashes the game, anyone wanna tell me why???

Quote:
<font face="Verdana, Arial" size="2">
#Brad S Movie 1
#
#
#

symbols
message entered
message timer
thing kyle local
template gunless=KyleBryarActor local
thing cam1
thing cam2
thing cam3
thing cam4
thing cam5
thing cam6
thing player local
thing stormy1
thing stormy2
thing reb1
thing reb2
thing impc
thing rebc
thing bombghost1
thing bombghost2
thing bombghost3
thing bombghost4
thing bombghost5
thing bombghost6
thing bombghost7
thing bombghost8

flex speed=2.0
int Player local

end

code
entered:
Player = GetLocalPlayerThing();

// freeze Kyle
SetActorFlags(Player, 0xa00000);
StopThing(Player);
SetActorFlags(stormy1, 0xa00000);
StopThing(stormy1);
SetActorFlags(stormy2, 0xa00000);
StopThing(stormy2);
SetActorFlags(reb1, 0xa00000);
StopThing(reb1);
SetActorFlags(reb2, 0xa00000);
StopThing(reb2);
SetActorFlags(impc, 0xa00000);
StopThing(impc);
SetActorFlags(rebc, 0xa00000);
StopThing(rebc);
// switch the player for an Actor
SetActorFlags(player, 0xa00000);
StopThing(player);
Kyle = CreateThing(gunless, player);
StopThing(Kyle);
SetThingCurGeoMode(player, 0);

SetCameraFocus(0, cam1);
SetCurrentCamera(0);
MoveToFrame(cam1, 1, speed);
MoveToFrame(cam1, 2, speed);

AiSetMoveSpeed(stormy1, 1.0);
AiSetMovePos(stormy1,bombghost1);
StopThing(stormy1);
AiSetLookPos(stormy1,bombghost2);

SetCameraFocus(0, cam2);
SetCurrentCamera(0);
MoveToFrame(cam2, 1, speed);
MoveToFrame(cam2, 2, speed);
MoveToFrame(cam2, 3, speed);

SetCameraFocus(0, cam3);
SetCurrentCamera(0);
Print("Imperial Commander: Captain, I ask you for the last time...");
Print("Imperial Commander: ...where are the battle plans?");
SetCameraFocus(0, cam4);
SetCurrentCamera(0);
Print("Rebel Captain: I won't tell you.");
SetCameraFocus(0, cam3);
SetCurrentCamera(0);
Print("Imperial Commander: Very well Captain...");
AiSetMoveSpeed(impc, 1.0);
AiSetMovePos(impc,bombghost3);
SetCameraFocus(0, cam5);
SetCurrentCamera(0);
Print("Imperial Commander: Soldier, take this scum and the rest of his crew down to the docking bay and wait for me there.");
Print("Stormtrooper: Yes sir.");

SetCameraFocus(0, cam6);
SetCurrentCamera(0);
MoveToFrame(cam2, 1, speed);
MoveToFrame(cam2, 2, speed);
MoveToFrame(cam2, 3, speed);
AiSetMoveSpeed(stormy1, 1.0);
AiSetMovePos(stormy1,bombghost4);
AiSetMoveSpeed(stormy2, 1.0);
AiSetMovePos(stormy2,bombghost7);
AiSetMoveSpeed(reb1, 1.0);
AiSetMovePos(reb1,bombghost6);
AiSetMoveSpeed(reb2, 1.0);
AiSetMovePos(reb2,bombghost5);
AiSetMoveSpeed(rebc, 1.0);
AiSetMovePos(rebc,bombghost8);
DestroyThing(stormy1);
DestroyThing(stormy2);
DestroyThing(reb1);
DestroyThing(reb2);
DestroyThing(rebc);
Sleep(4.0);
SetCameraFocus(0, jkGetLocalPlayer());
if (jkGetSaberCam() == 1)
CycleCamera();
DestroyThing(cam);

// unfreeze's Kyle
ClearActorFlags(Player, 0xa00000);

SetGoalFlags(Player, 1, 2);
SetGoalFlags(Player, 2, 1);
return;

end
</font>




------------------
"Everyone Dies..."
-Fett

The Mr. Smiley Animations!
"Everyone Dies..."
-Fett

My Website
Brad's Highschool Level
Unfinished Levels For Download
2002-05-26, 10:11 AM #2
Because you have absolute no Sleep();s. Put those in, and tell us where it crashes.

------------------
"She shall make you a real boy, and I shall make her a real woman." - Joe, A.I.
Jack Chick preaches it
the idiot is the person who follows the idiot and your not following me your insulting me your following the path of a idiot so that makes you the idiot - LC Tusken
2002-05-26, 10:53 AM #3
This cog has all the classic mistakes..

As Wolfy mentioned, no sleeps()..

Multiple redundant movetoframes... You only need to state one movetoframe, and the object will move through all of the frames inbetween it's current frame, and the target frame.

Dont use Print for dialog. Use JKstrings or UNI strings.


The verb 'Jkgetsabercam()' DOES NOT get the current camera view. It actully gets the autosabercam option from the game settings. Use 'Getcurrentcamera()' instead.




And the big one, the reason this cog crashes...

"Destroything(cam);"... The variable 'cam' does not exist in the symbols, nor is it initialized in the code, so JK gives it the value of 0. Since object 0 is usually the player in SP, the player is destroyed. (..and when the player is destroyed, JK crashes)


Fix those errors, and the cog should function properly.

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

[This message has been edited by GBK (edited May 26, 2002).]
And when the moment is right, I'm gonna fly a kite.
2002-05-26, 11:19 AM #4
Jk Strings?? no no no, print command works just fine with all my other working cutscenes... as for the sleeps, i fixed those and the cam destroy, but now it wont start on startup, i have

messages startup
and
code
startup:

but i dunno.......
"Everyone Dies..."
-Fett

My Website
Brad's Highschool Level
Unfinished Levels For Download
2002-05-27, 6:52 AM #5
message, not messages.
APT 1, 2, 3/4, 5/6
TDT
DMDMD

http://veddertheshredder.com
2002-05-27, 9:14 AM #6
Print command works fine, but it is very inefficient.

------------------
"The future is not determined by a throw of the dice, but is determined by the conscious decisions of you and me."
I am addicted to ellipses!!! AHHH!!! ...
2002-05-29, 3:38 AM #7
Print is good for things you won't repeat agian. Putting it in JKstring is good for well... Repeating. [http://forums.massassi.net/html/smile.gif]

------------------
The Sniper Missions. Current project, The Sniper Missions
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2002-05-29, 4:10 AM #8
Dont use print for dialog in cutscenes . . ever. Ive seen cases, on low memory machines, where the text doesnt appear.


In short, USE A STRING TYPE. Do NOT use print...

------------------
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.
And when the moment is right, I'm gonna fly a kite.

↑ Up to the top!