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 → Stop! You... Key!
Stop! You... Key!
2002-03-15, 5:09 AM #1
part of cog:
-----
AiSetLookPos(guy2, GetThingPos(look1)); //guy looks at target
AiSetMoveFrame(guy2, 0); //make sure he is where he's supposed to be
AiSetMoveFrame(guy2, 1); //walk to frame 1
... //unimportant camera moves stood here
kneel2 = playkey(guy2, knl2, 1, 0x1);//kneels down and stays down.
------

So far so good, now comes a pretty long conversation, but then comes the trouble, he needs to get up again and walk back to frame 1, It partually works...

How I thought I should do it:
------

StopKey(guy2, knl2, blah);// should stop key with a .5 delay (flex blah=0.5)
sleep(1.0);
AiSetLookPos(guy2, GetThingPos(look2));// were looking again
AiSetMoveFrame(guy2, 0);// and we move
-----
It works, except that the key doesn't stop, so he turns while kneeling and then floats back.

Probably I used stopkey incorrectly...
Help
APT 1, 2, 3/4, 5/6
TDT
DMDMD

http://veddertheshredder.com
2002-03-15, 9:49 AM #2
Just a wild guess - try playing a different key instead of the stopkey???

------------------
Sylvicolus JK homepage
If I have ever made any valuable discoveries, it has been owing more to
patient observation than to any other reason. -Isaac Newton
Sylvicolus JK homepage
If I have ever made any valuable discoveries, it has been owing more to
patient observation than to any other reason. -Isaac Newton
2002-03-16, 11:59 AM #3
Yes, you have used StopKey() incorrectly. [http://forums.massassi.net/html/wink.gif]

Give StopKey() the ID of the animation, not the keyframe.

------------------
Author of the Jedi Knight DataMaster.
Visit Saber's Domain.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-03-17, 12:41 AM #4
ah offcourse!
APT 1, 2, 3/4, 5/6
TDT
DMDMD

http://veddertheshredder.com
2002-03-17, 1:15 AM #5
it worked thanks alot!
APT 1, 2, 3/4, 5/6
TDT
DMDMD

http://veddertheshredder.com
2002-03-17, 11:02 AM #6
You're welcome. [http://forums.massassi.net/html/wink.gif]

Two other things, though:

Code:
AiSetMoveFrame(guy2, 0); //make sure he is where he's supposed to be
AiSetMoveFrame(guy2, 1); //walk to frame 1

You can't give an object two move commands at the same time. As you have it, only the second command will be performed. The first one won't make a noticeable difference.

Code:
StopKey(guy2, knl2, blah);// should stop key with a .5 delay


AFAIK, only animations played with the 0x10 Keyframe Flag can be stopped with a delay.

------------------
Author of the Jedi Knight DataMaster.
Visit Saber's Domain.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-03-18, 4:50 AM #7
thanks
APT 1, 2, 3/4, 5/6
TDT
DMDMD

http://veddertheshredder.com

↑ Up to the top!