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 → weird...
weird...
2002-09-16, 8:12 AM #1
K, this cutscenecog is far from complete, but I've run into some problems with moving AI around. Mainly, they refuse to walk during the cutscene...
The Tsjemir person and the Stormie1 both respond well to the AiSetLookFrame commands, but they refuse to walk until after the cutscene. (I've tried both AiSetMoveFrame and AiSetMovePos. Both with the same effect.)

I've used the commands before but I don't recall having any difficulties with it.

Do I have to use a arrived message? Is that it?


Code:
# Jedi Knight Cog Script
# This cutscene will once more explain the whole 'apt' history.
# cutscenelevel3.cog 
#
# This was writen by ZOOIkes aka Vedder
#
#
#==============================================================#
symbols

message	startup

thing		cam0
thing		cam1
thing		cam2
thing		cam3
thing		cam4
thing		shuttle
thing		digger
thing		stormie1
thing		Tsjemir

vector		Gosto
vector		GoTes

int		player		local
int		done=0		local
int		diggin		local
int		flyin		local

sound		shuttlesnd	
sound		diggersnd	

flex		camspeed1=8
flex		camspeed2=2
flex		shuttlespeed=4
flex		stspeed=2
flex		patrolspeed=2
end
#==============================================================#
code

startup:
	if(done) Return;
	done = 1;
	player = GetLocalPlayerThing();
	jkBeginCutscene();
	SetActorFlags(player, 0xa00000);
	StopThing(player);

	AISetMoveSpeed(stormie1, stspeed); 
	AISetMoveSpeed(Tsjemir, patrolspeed);

	SetCameraFocus(0, cam0);
	Sleep(2);
	Print("There is a myth which says that there was once a perfect race.");
	Sleep(4);
	Print("It is said that their perfection came forth out of a divine disc.");
	Sleep(4);
	Print("This disc could bring unlimited strength....");
	Sleep(4);
	Print("The myth didn't mention where this race lived.");
	Sleep(4);
	Print("Hellior4");
	Sleep(1);
	SetCameraFocus(0, cam1);
	Sleep(1);
	MoveToFrame(cam1, 1, camspeed1);
	Sleep(1);
	Print("Over time the race extincted,");
	Sleep(1.5);
	Print("leaving their temples and palaces for the elements to destroy.");
	Sleep(6);
	SetCameraFocus(0, cam0);
	Sleep(2);
	Print("When the planet was discovered by the Imperial forces near the end of their dominion,");
	flyin=PlaySoundLocal(shuttlesnd, 1, 0, 0x1);
	MoveToFrame(shuttle, 1, shuttlespeed);
	Sleep(7);
	Stopsound(flyin, 0.1);
	DestroyThing(shuttle);
	SetCameraFocus(0, cam2);
	Print("they began transforming the planet into a mining facility.");
	diggin=PlaySoundLocal(diggersnd, 1, 0, 0x1);
	MoveToFrame(digger, 1, 5);
	
	AISetLookFrame(stormie1, 1);
	AISetMovePos(stormie1, Gosto);	
	Sleep(0.1);
	Sleep(8);
	StopSound(diggin, 0.1);
	SetCameraFocus(0, cam3);
	MoveToFrame(cam3, 5, camspeed1);
	Print("While digging through the rocky soil they stumbled upon these temples and palaces.");
	Sleep(4);
	Print("This is where they found the mythical disc.");
	Sleep(5);
	SetCameraFocus(0, cam0);
	Sleep(.5);
	Print("After the destruction of the second Death Star,");
	Sleep(3);
	Print("when the Empire fell,");
	Sleep(2.5);
	Print("the planet was abandoned.");
	Sleep(2.5);
	Print("What had happened to the disc became a mystery...");
	Sleep(4);
	Print("The New Republic never could free the galaxy from tyranny completely.");
	Sleep(4);
	Print("The Senate in a while became as corrupt as it was at the time of the Old Republic.");
	Sleep(4);
	SetCameraFocus(0, cam4);
	Sleep(1);
	MoveToFrame(cam4, 3, camspeed2);
	Print("Tsjemir, a thief, earned his money stealing,");
	AISetLookFrame(Tsjemir, 2);
	AISetMovePos(Tsjemir, goTes);
	Sleep(0.1);
	Sleep(2);
	Print("mostly he plundered old Imperial Bunkers or abandoned bases.");
	Sleep(1);

	Sleep(3);
	jkEndCutscene();
	SetCameraFocus(0, jkGetLocalPlayer());
	if(jkGetSaberCam() == 1) CycleCamera();
	ClearActorFlags(player, 0xa00000);

Return;
#------------------------------------------------------
end
APT 1, 2, 3/4, 5/6
TDT
DMDMD

http://veddertheshredder.com
2002-09-17, 12:23 PM #2
I see no problems with the cog that would stop the AI from moving. If the actors can look at the frames, then they do exist, and the actors should be able to move to them.

So I think the problem is in the level. Make sure that you have the actors set up correctly and that they have a proper aiclass.

If all else fails, mail me the level. [http://forums.massassi.net/html/wink.gif]

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-09-18, 5:40 AM #3
Yeah well they, walk but not untill after jkendcutscene is called.
APT 1, 2, 3/4, 5/6
TDT
DMDMD

http://veddertheshredder.com
2002-09-18, 12:56 PM #4
So they don't move until the cutscene is ended? Does removing the cutscene verbs fix the problem? It shouldn't. Do you have any other cogs working with the same actors?

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-09-18, 2:24 PM #5
Maybe its related to the cutscene verbs. I dont remember any of the cutscenes in JK having actual MOVING actors, they all just stood there. It might be setup to 'freeze' all the game actors so that you dont accidently get shot in the arse while listening to the narriator guy. Just a thought.
2002-09-18, 4:25 PM #6
Yes, but this is for MotS, which indeed does have movers.
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-09-19, 5:21 AM #7
plus, when it's set up like below (which is a cog I used in APT4) it works perfectly during the cutscene.
But I wouldn't know how to implent it like that in the new cog, because eventually there'll be ALOT of moving actors.

There are no other cogs in the level yet, except the above one.

I'll try removing the cutscene verbs.

Code:
symbols

message	crossed
message	arrived
surface	crs
thing		cam
thing		Kihr
thing		player local
float		patrolspeed=1
float		numframes=1
int		curframe=1		local
flex		speed=2.0

# ========================================================================================
end 
# ========================================================================================
code

crossed:

	if (done) return;
	done = 1;
	// setup first 
	player = GetLocalPlayerThing(); 
	jkBeginCutscene(); 
	// switch the player for an Actor 
	SetActorFlags(player, 0xa00000); 
	StopThing(player); 
	SetCameraFocus(0, cam);
	MoveToFrame(cam, 9, speed);
	Sleep(6.0);
	AiSetMoveSpeed(Kihr, patrolspeed); 
	AISetLookFrame(Kihr, 0);
	AISetMoveFrame(Kihr, 0);
	Sleep(17.0);
	jkEndCutscene();
	SetCameraFocus(0, player);
	if (jkGetSaberCam() == 1)
	CycleCamera();
	// unfreeze's Kyle
	ClearActorFlags(player, 0xa00000);
	return;
#----------
arrived:
	curframe = curframe + 1;
	if (curframe > numframes) DestroyThing(K);

	AISetLookFrame(Kihr, curframe);
	AISetMoveFrame(Kihr, curframe);
	return;

end
APT 1, 2, 3/4, 5/6
TDT
DMDMD

http://veddertheshredder.com
2002-10-06, 1:24 AM #8
I had a bit of an editing break for the last while. I started again now, and made alot of progress on this cutscene level, but they still refuse to move... [http://forums.massassi.net/html/frown.gif]
I removed the cutscene verbs (also because of GBK's request for authors not to use it)

I might send it too you, SaberMaster, since all else is failing. [http://forums.massassi.net/html/wink.gif]
APT 1, 2, 3/4, 5/6
TDT
DMDMD

http://veddertheshredder.com
2002-10-06, 7:47 AM #9
Alright, but send it to me within the next few days as I'll be busy after that. [http://forums.massassi.net/html/wink.gif]

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-10-07, 8:20 AM #10
uh, weirder...

While expanding the cutscene and implenting more moving actors I came to the conclusion so DO move... [http://forums.massassi.net/html/confused.gif] This is weird... They are set up completely the same.
APT 1, 2, 3/4, 5/6
TDT
DMDMD

http://veddertheshredder.com
2002-10-08, 4:43 AM #11
SM: I'll send you a link in a sec.

If anyone else wants to take a look, say so and I'll give you a link.
APT 1, 2, 3/4, 5/6
TDT
DMDMD

http://veddertheshredder.com
2002-10-09, 3:53 PM #12
Zooikes, sorry I can't do any testing now, but it looks like you have far too many variables with values passed from the JKL. Try removing some of those variables. You'll know if the value is being passed correctly to the cog if the corresponding symbol's value prints correctly when the cog runs.

Another thing I noticed is that JED seems to have some parsing errors with the cogs' symbols. The arguments in the JKL match the parameters in the Cog's symbols, but JED isn't reading them correctly. That could be caused by having too many arguments for the cutscene cog.

Anyways, good luck with your project, and I'll try to test the level later if possible. [http://forums.massassi.net/html/wink.gif]

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.

[This message has been edited by SaberMaster (edited October 09, 2002).]
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-10-13, 7:18 AM #13
Just had time to do some testing now, and I found the problem. You'll need to clear the actors' 0x1000 AI Mode Flag before using the AI verbs with them.

I found that was the problem when I set the external camera to look at the actors when they were supposed to move. When the camera "saw" them, the 0x1000 flag was cleared and the actors ran to their frames.

This is the last time I'll work with cogs for a while... [http://forums.massassi.net/html/wink.gif]

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-11-30, 4:52 AM #14
Sorry to bring this old topic back up, but I hadven't had a working pc for the last 5 weeks so I couldn't respond.

Thanks alot Sabermaster!
I presume I have to use:
AIClearMode(actor, 0x1000);
right?
APT 1, 2, 3/4, 5/6
TDT
DMDMD

http://veddertheshredder.com
2002-11-30, 6:05 AM #15
Sabermaster is gone . . . but yet, use that command.


And please, dont bring back dead threads, no matter the reason. [http://forums.massassi.net/html/frown.gif]
And when the moment is right, I'm gonna fly a kite.

↑ Up to the top!