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 → Mr. Help is Needed
Mr. Help is Needed
2004-06-05, 6:53 AM #1
Okay, this time I am testing this cog for the opening of the Celphi-level, made by JKDomination.

The problem is that, for some reason, it doesn't animate the face when Inrei is supposed to talk, and doesn't play the final keyframe sequence...

Code:
# Jedi Knight Cog Script
#
# testanim.cog
#
# (Test) Opening Cutscene 
# 
# [JKDomination]
# 
# ========================================================================================

symbols

message startup

# Y-1800 Celphi MELTDOWN Sequence

keyframe     	oldsit=inrsitidle1.key		local
keyframe     	sit=inrsitmov1.key		local
keyframe     	swt=inrsitswt1.key		local
keyframe     	mov=inrsitmov3.key		local
keyframe	mov4=inrsitmov4.key		local
thing		inrseat
thing		cam
thing		cam2
thing		cam3
material	normal=comm_panel.mat	local
material	impscrn=comm_impconn.mat	local
surface		thescreen
sound		turnon=commlink_on.wav		local
sound		hum=kejim_console_lp.wav	local
sound		turnoff=commlink_off.wav	local
model		bsseat=pilotschair2b.3do	local
thing		seatghost

# The Conversation stuff

sound		msg1=doom_array1.wav		local
sound		msg2=doom_array2.wav		local
sound		msg3=doom_array7.wav		local
sound		msg4=screen1lp.wav		local
sound		msg5=screen2lp.wav		local
material	inrface=shahdfr.mat		local

# All the INT crap no-one really cares about

int		inrsit			local
int		inrmove			local
int		inrmove2		local
int		inrmove3		local
int		lastmove		local
int		mooger			local
int		mooger2			local
int		mooger3			local
int		meshum			local
int		faceanim		local
thing   	player              local


end

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

code

startup:
	SetActorFlags(jkGetLocalPlayer(), 0xa00000);
	stopthing(getlocalplayerthing());
	SetCameraFocus(0, cam);
	SetCurrentCamera(0);
	sleep(0.5);
	inrsit = playkey(inrseat, sit, 1, 0x4);
	mooger = Sleep(GetKeyLen(sit));
	inrmove = playkey(inrseat, swt, 1, 0x4);
	mooger2 = Sleep(GetKeyLen(swt));
	playsoundlocal(turnon, 0.9, 0, 0x0);
	SetCameraFocus(0, cam2);
	SetCurrentCamera(0);
	inrmove2 = playkey(inrseat, mov, 1, 0x4);
	sleep(0.49);
	SetSurfaceMat(thescreen,impscrn); 
	mooger3 = Sleep(GetKeyLen(mov));
	Sleep(GetSoundLen(turnon)); 
	meshum = playsoundlocal(hum, 0.9, 0, 0x1);
	SurfaceAnim(thescreen,2.5,0x1); 

#	The Conversation

	sleep(0.27);
	playsoundlocal(msg1, 1.4, 0, 0x0);
	Print("- Connection to Sybrin Installation Established -");
	Sleep(GetSoundLen(msg1));
	sleep(1.37);
	playsoundlocal(msg5, 1.4, 0, 0x0);
	Print("OPERATOR: Sybrin Installation to Y-1800 Celphi MELTDOWN, please report.");
	Sleep(GetSoundLen(msg5));
	sleep(1.29);
	faceanim = materialanim(inrface, 4, 0x1);
	Print("INREI CHEREN: This is Inrei Cheren to Sybrin Installation.");
	sleep(2.8);
	stopAnim(faceanim);
	SetMaterialCel(inrface,0);
	sleep(1.3);
	playsoundlocal(msg3, 1.4, 0, 0x0);
	Print("OPERATOR: Ah, ms. Cheren. I presume that your mission was successful?");
	Sleep(GetSoundLen(msg3));
	sleep(1.3);
	SetCameraFocus(0, cam3);
	SetCurrentCamera(0);
	faceanim = materialanim(inrface, 4, 0x1);
	Print("INREI: But of course. I request landing permission to hangar C451, code ECYPH36.");
	sleep(4.8);
	stopAnim(faceanim);
	SetMaterialCel(inrface,0);
	sleep(1.88);
	playsoundlocal(msg2, 1.4, 0, 0x0);
	Print("OPERATOR: Permission granted. Report to Commander Kalon as soon as you have finished docking.");
	Sleep(GetSoundLen(msg2));
	sleep(1.3);
	SetCameraFocus(0, cam2);
	SetCurrentCamera(0);
	faceanim = materialanim(inrface, 4, 0x1);
	Print("INREI: Inrei Cheren, out.");
	sleep(1.85);
	stopAnim(faceanim);
	SetMaterialCel(inrface,0);
	sleep(1.2);

#	Cutscene continues

	lastmove=PlayKey(inrseat,mov4,1,0x4); 
	StopSurfaceAnim(thescreen);
	sleep(1.39);
	StopSound(meshum,0);
	SetSurfaceMat(thescreen,normal); 
	playsoundlocal(turnoff, 0.7, 0, 0x0);
	sleep(2.5);
	SetCameraFocus(0, jkGetLocalPlayer());
	ClearActorFlags(jkGetLocalPlayer(), 0xa00000);
	DestroyThing(cam);
	DestroyThing(cam2);
	DestroyThing(cam3);
	DestroyThing(inrseat); 
	SetThingModel(seatghost,bsseat); 
	return;


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

end


So, can anyone of you masters realize what's wrong and help me and mr. JKDomination?

------------------
<landfish> FastGamerr > Satan
Star Wars: TODOA | DXN - Deus Ex: Nihilum
2004-06-05, 10:42 AM #2
One problem with your code in general is you have "mooger# = Sleep(...);" in a couple spots. Sleep() doesn't return a value.
Also, if it makes life easier, you don't need to store an id in a variable (ie "keyid = PlayKey(...);") unless you're going to need that id for something else (ie "StopAnim(keyid);"). It's not necessary, but can make things a little easier [http://forums.massassi.net/html/smile.gif].

But remove the "mooger# =" from in front of the Sleep() statements and see if that happens to fix your problem.
Off chance, but maybe you defined the wrong texture for your actor and that's why it isn't animating.

------------------
for(i = 0; i < 00; i = i + 1) Print("massassi is good");
PrintInt(i); //print the integer value of infinity
May the mass times acceleration be with you.
2004-06-05, 9:45 PM #3
After replacing the previous animated face mat with another, I got the face animation working.

Now, the only problem remains with the keyframe...

------------------
<landfish> FastGamerr > Satan

[This message has been edited by FastGamerr (edited June 06, 2004).]
Star Wars: TODOA | DXN - Deus Ex: Nihilum
2004-06-06, 2:12 AM #4
One stopkey-command and whole thing was solved... [http://forums.massassi.net/html/wink.gif]

[This message has been edited by FastGamerr (edited June 06, 2004).]
Star Wars: TODOA | DXN - Deus Ex: Nihilum

↑ Up to the top!