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 tutorial does not work for me
cutscene cog tutorial does not work for me
2003-04-03, 6:45 AM #1
i created this cog, where the actor punches

# Jedi Knight Cog Script
#
# cam
#
# Opening level cut scene
#
#
# This Cog is Not supported by LucasArts Entertainment Co

symbols

thing cam1
thing player local

thing Rollo local

template gunless=Rollo local

keyframe punch=kypnchl0.key local

int keynum local
message startup
message activated

end

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

code

startup:
setmastercog(getSelfCog());
playsong(0,0,0);

player = GetLocalPlayerThing();

# jkBeginCutscene();

// switch the player for an Actor

SetActorFlags(player, 0xa00000);

StopThing(player);

Rollo = CreateThing(gunless, player);

StopThing(Rollo);

SetThingCurGeoMode(player, 0);


SetCameraFocus(0, cam1);
SetCurrentCamera(0);

sleep(10.0)
keynum=PlayKey(Rollo, punch, 1, 0x4);

sleep(20.0);
StopKey(Rollo, keynum, 0);
// DestroyThing(cam);

// unfreeze Kyle
ClearActorFlags(jkGetLocalPlayer(), 0xa00000);

jkEndLevel(1);
return;

activated:
jkEndLevel(1);
return;

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

end


The actor does not punch, but instead i am just the player, and no camera view at all [http://forums.massassi.net/html/frown.gif]

But when i delete the keyframe for punching and set no animation at all, i have this COG:

# Jedi Knight Cog Script
#
# cam
#
# Opening level cut scene
#
#
# This Cog is Not supported by LucasArts Entertainment Co

symbols

thing cam1
thing player local

thing Rollo local

template gunless=Rollo local


message startup
message activated

end

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

code

startup:
setmastercog(getSelfCog());
playsong(0,0,0);

player = GetLocalPlayerThing();

# jkBeginCutscene();

// switch the player for an Actor

SetActorFlags(player, 0xa00000);

StopThing(player);

Rollo = CreateThing(gunless, player);

StopThing(Rollo);

SetThingCurGeoMode(player, 0);


SetCameraFocus(0, cam1);
SetCurrentCamera(0);



sleep(20.0);

// DestroyThing(cam);

// unfreeze Kyle
ClearActorFlags(jkGetLocalPlayer(), 0xa00000);

jkEndLevel(1);
return;

activated:
jkEndLevel(1);
return;

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

end

And this one works. i can see through the camera a gunless actors, as i wanted to. Why doesn't my puch animation let my camera work?

Please help me understand playing keyanimations in the cutscenes [http://forums.massassi.net/html/frown.gif]

------------------
2003-04-03, 6:07 PM #2
Instead of changing the geomode, use a thing flag to set the player invisible. Actor flags, for some reason, don't work for invisibility, either (at least not for the player). I'm not sure about the camera. Make sure the sector it's in coincides with the sector it claims to be assigned to ("sector" in thing dialog box). Also, I'm not sure you would want to set this as the master cog, but I don't think it would hurt much. Try and see if it makes a difference.

------------------
May the forks be with you.
AOL - providing excellent internet connection until you leave their domain.
Catloaf, meet mouseloaf.
My music
2003-04-04, 1:48 AM #3
how do i use a thing flag to set the player invisible?

------------------
2003-04-05, 11:16 AM #4
Quote:
<font face="Verdana, Arial" size="2">Actor flags, for some reason, don't work for invisibility, either (at least not for the player).</font>


Especially considering that there is no Actor Flag for invisibility.

The reason your first cog doesn't work is a simple syntax error - put a semicolon after the sleep statement.

A few things...

Why does your cog have an activated message? Unless cam1 can be activated, it's useless. Why do you have a PlaySong(0,0,0)? That shouldn't do anything. This is for JK, so remove the JK Cutscene verbs.

The comment "// switch the player for an Actor" makes no sense. Those flags basically freeze the player, disable his hotkeys, and remove his status display.

Even if JK allows having a template with the same name as a thing variable, it's bad practice to do it. And last of all, why use jkGetLocalPlayer() when you have a player variable already?

Other than that, your very basic cutscene cog should work without error. And in future, post code within UBB code tags and without long comment lines. That makes it a lot easier to read.

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2003-04-07, 6:27 PM #5
Quote:
<font face="Verdana, Arial" size="2">Originally posted by SaberMaster:
Especially considering that there is no Actor Flag for invisibility.
</font>


???
Um...
Massassi's JK flags specs say 0x80 is invisible, as does CogWriter.

Use "SetThingFlags(player, 0x10)" to set the player invisible. You also might want to change "SetActorFlags(player, 0xa00000)" to "SetActorFlags(player, 0xa00008)" to add invulnerability, especially since your actor is going to punch. If your player dies (or maybe gets damaged) it might mess up your cutscene (kyle will yell or whatever). If you manage to get the GeoFlags to work for the player, this shouldn't be a problem, but I alway have trouble getting geoflags to work for the player. Works fine on other 3do's though.

------------------
May the forks be with you.
AOL - providing excellent internet connection until you leave their domain.
There is a great disturbance in my shorts...

[This message has been edited by DogSRoOL (edited April 07, 2003).]
Catloaf, meet mouseloaf.
My music
2003-04-08, 5:23 AM #6
I am a very bad COG'er. I have to put a COG tohether by bits and pieces from other COG's. Most of them work. I just have to little time to work it all out with my job. It will take some time to get my 10 level episode to finish, but i will finish it. I did get my player character invisible, and he stand there motionless without a weapon as i wanted. I just can't get him to move. Maybe if i extract the key file and use the playkey command.

------------------
2003-04-08, 8:45 AM #7
Quote:
<font face="Verdana, Arial" size="2">Massassi's JK flags specs say 0x80 is invisible, as does CogWriter.</font>


They're wrong. On 0x80, "This flag gives players partial invisibility from actors. The actors will follow the player and use their BlindFire instinct. For actors, this flag is only symbolic of Force Persuasion." -Myself. [http://forums.massassi.net/html/wink.gif]

Can't really help you there, Gorgi. Once you create a gunless for your cutscene, you'll need to use frames as well as keys to make him move around and act his part. If you run into a specific problem, just post it here and hopefully someone will answer it. [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.
2003-04-08, 7:41 PM #8
I thought 0x80 was probably wrong. Maybe they should be a little more specific...

As for your actor, make sure he has the same pup file specified in its template as your player. You'll have to also change type=player to type=actor. If you based your actor on the original player, add this instead of the above 2 things: "type=actor". In either case, make sure StaticDrag=0. If you have a staticdrag value on an actor, he'll require a nudge to get him moving.

------------------
May the forks be with you.
AOL - providing excellent internet connection until you leave their domain.
There is a great disturbance in my shorts...
Catloaf, meet mouseloaf.
My music

↑ Up to the top!