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 → GetThingLVec()??
GetThingLVec()??
2000-11-28, 3:40 PM #1
I need some help using GetThingLVec. I need it so when the player is rotating in place when swinging the saber, a different animation is played. How would I go about doing this?
Capitalization
Commas
Periods
Question Marks
Apostrophes
Confusable Words
Plague Words
2000-11-28, 6:23 PM #2
Hmm.. that seems like live updates on the keys to me... try playing a new key that makes it look like the player's moving and have it mix with the other keys.
2000-11-29, 12:15 PM #3
No, that's not what it is. I need an if...then statement that checks if the player is rotating or not.
Capitalization
Commas
Periods
Question Marks
Apostrophes
Confusable Words
Plague Words
2000-11-29, 4:29 PM #4
Have a cog pulse .001 or .01 to see if the velocity changed, or compare look vectors:

start:
oldvec = GetThingLVec(player);
SetPulse(0.01);

Return;

pulse:
if ((GetThingLVec(player) != oldvec) && (!turning))
{
playkey(move_blend, 1, player);
turning = 1;
settimer(GetKeyLength(move_blend);
}

Return;

timer:
turning = 0;
oldvec = GetThingLVec(player);

Return;

Of course the above code is nowhere near perfect (I think I messed up on some of the parameters), but it gives you and idea of what to do. It will play a key when the player's vecor changes, in turn creating a molding effect (with the right custom key). You might want to add a mode amount (like 20 or 30 degrees) before it'll trigger, but that's all I can think up this late at night.

↑ Up to the top!