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 → COGging a keyframe animation
COGging a keyframe animation
2002-06-24, 6:53 AM #1
Well, this is what I've done so far - I've used PuppetJedi to design a nice keyfile animation of a crashing snowspeeder. Now I want to write the COG to make it appear during a level when a player enters a sector or crosses an adjoin. In fact, I'd like it if it could work using any message at all, because so far I am having no luck!

I am making my level in MotS, which might be the trouble, as I've gotten keys to play OK in Jedi Knight by following tutorials. Are there different flags etc I don't know about for the PlayKeyFrame command, for example?
2002-06-24, 10:04 AM #2
Give me the cog you have so far. Have you checked it in Parsec or CogWriter?

------------------
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-06-25, 7:02 AM #3
ZZZZZZZZZZzzzzzz....
[http://forums.massassi.net/html/wink.gif]

check the cog in the post below.

[This message has been edited by ZOOIkes (edited June 26, 2002).]
APT 1, 2, 3/4, 5/6
TDT
DMDMD

http://veddertheshredder.com
2002-06-25, 3:10 PM #4
Try this.
Code:
# Jedi Knight Cog Script
#
# key_player.cog
#
# A basic keyframe player cog
#
# [DP]
#
# Demo cog for rob_whatman

symbols
   surface      adjoin
   thing        speeder
   keyframe     key0
   int          done=0        local

   message      crossed

end

## Code Section
code
crossed:
   if(!done)     // So it doesn't play twice
   {
      done = 1;
      PlayKey(speeder, key0, 1, 0x14);     // This is the line that will play the key
   }
return;

end

If you want sound or add it to a master cog, come back here, I'll give you that cog. P.S. there's no PlayKeyFrame(); line in cog. [http://forums.massassi.net/html/wink.gif]

Edited, to help ease ZOOIkes pain. [http://forums.massassi.net/html/tongue.gif] (and so I can spell his name right [http://forums.massassi.net/html/redface.gif] )

------------------
The Sniper Missions. Current project, The Sniper Missions

[This message has been edited by Descent_pilot (edited June 26, 2002).]
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2002-06-25, 11:45 PM #5
whoops, I must have been asleep when I wrote that [http://forums.massassi.net/html/smile.gif]
APT 1, 2, 3/4, 5/6
TDT
DMDMD

http://veddertheshredder.com
2002-06-26, 8:15 AM #6
Many thanks for the COG, Descent_pilot! My COG was a mess, cobbled together from the Mots cutscene COGs. Its nice to see how neat COGS should look.

Sadly, my animation still doesn't play. Is there anything else I should check for? I am just a beginner at all this.

P.S. Maybe ZOOKies has some ideas, when he finally wakes up... [http://forums.massassi.net/html/smile.gif]
2002-06-26, 6:44 PM #7
Use the double click select in the cog placer thingy in JED. That will get the right key file. Try messing around with the key flags, shouldn't change anything, but it might work. Add this line just above the If statement.
Code:
If(GetSenderRef() != GetLocalPlayerThing()) Return;
One more thing, you don't need the 'thing speeder' in the symbols section.

------------------
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-06-27, 9:31 AM #8
Pilot, the cog you posted should work, but what you said in that last post is wrong. The senderref of the crossed message is the adjoin that was crossed, not the player. And you need to have the speeder defined for the first param of PlayKey().

The problem is probably with the keyframe.

------------------
Author of the JK DataMaster, Parsec, and the EditPlus Cog Files.
Visit Saber's Domain.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-06-27, 10:03 AM #9
So I was right in the first place. [http://forums.massassi.net/html/redface.gif] *blushes* It would be GetSourceRef() instead. [http://forums.massassi.net/html/redface.gif] That's a good example why you shouldn't write cogs late at night.

------------------
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-06-28, 10:19 AM #10
Descent-pilot, be of good cheer - thanks to your COG, I have gotten my keyframes moving! I tried keyframing in JK, and got the template of C3PO to dance (very disturbing, I know...). So, I realised I had forgotten to put a PUP file in my MotS snowspeeder template, so I was essentially keyframing a 'flying brick'. I just added cr.pup to the template.

The other thing was to do with a niggly difference btw JK and MotS. I altered the flag in your COG so that the PlayKey line reads:

PlayKey(speeder, key0, 1, 0x4);

That seemed to do it. Much thanks and respect at you!

↑ Up to the top!