PDA

View Full Version : Using the 180 degrees animation.


Faelion
04-07-2007, 05:33 PM
Okay, I'd like to be able to use this animation in a bound key. Where do I start on making it usable? I am a decent programmer [I've made a Black Jack game from scratch, and I understand programs when I read them.] and I have access to visual studio max [nonexpress]. I am, however, very unfamiliar with the Jedi Academy code. So, how may I accomplish this task?

UDM
04-07-2007, 05:56 PM
You might wanna post over at either the Jedi Academy or Jedi Outcast forums too, better chance of getting help. I say either because the mods aren't too fond of cross-posting ;)

razorace
04-07-2007, 09:47 PM
What do you mean by 180 degree animation?

Anyway, the question of implimentation depends on how you intend to have it used in the game. At the minimum, you're going to have to add it to anim.h as a new animation define. I recommend you check out OJP's version of the file to see how we added additional animations for stances and ledge grabs.

UDM
04-08-2007, 02:14 AM
I'm not a coder, but I'll bet it doesn't need to be a new animation. What he wants is to rotate the view 180 degrees only and stop. Remember some of those old FPSes? You tapped one button, and your character would turn around 180 degrees - that's what he's referring to. Tapping it once more would of course return your view back to your original position

Faelion
04-08-2007, 11:50 AM
UDM's got it. The animation is already at the bottom of the list; as Maxstate pointed out to me. LEGS_TURN180. So how do I assign it to mean anything? I probably need to know a lot more filenames than anim.h.

edit: though, if there is a way to do it effectively without the animation, then that would be helpful too.

razorace
04-08-2007, 03:19 PM
Oh, well, LEGS_TURN180 is probably already in the anim.h list. From there you're going to need to add code to make the turn 180 a functioning animation. Your best bet is to make it a command in g_cmd.c and then alter the bg_pmove code to make the player spin around when that animation is played.

Is this for a mod based on OJP or something totally different?

Faelion
04-08-2007, 04:28 PM
Yes. I am going to try to implement it into ojp's code, but I need to download it first.
(Why make it so you need to register to another site exactly?)

Thanks for the filenames.

DarthDie
04-08-2007, 04:38 PM
(Why make it so you need to register to another site exactly?)
What do you mean by that? You don't need to register to download source code.

Faelion
04-08-2007, 05:18 PM
Then I have misread it. I'd appreciate a link straight to it.

DarthDie
04-08-2007, 05:37 PM
Uh...there is no direct link....you need to down Tortiose SVN(link is...http://tortoisesvn.net/downloads) create a folder after installation and restart right click then click....*thinks* SVN checkout? Mebbe Checkout....then enter in URL of Reprository: https://OpenSVN.csie.org/ojp then click OK. And then you wait for it to download all of the files.

Faelion
04-08-2007, 06:01 PM
Great! Now I need to figure out JKA's variables and functions for cmds. I found each place that I need to put a piece of code, but I need to decide what goes into it.
Does the g_cmds call the bg_pmove at any time? Is it the other way? Do I only put animation information into bg_pmove? Does g_cmds only make the command appear in the console? How are g_cmds and bg_pmove connected?
Answering those will speed it up a lot.

DarthDie
04-08-2007, 06:41 PM
Does g_cmds only make the command appear in the console?
No commands appearing in console by pressing TAB is client side.

Maxstate
04-08-2007, 06:41 PM
Maybe this would be better off in the coding section?

razorace
04-08-2007, 08:16 PM
Great! Now I need to figure out JKA's variables and functions for cmds. I found each place that I need to put a piece of code, but I need to decide what goes into it.
Does the g_cmds call the bg_pmove at any time? Is it the other way? Do I only put animation information into bg_pmove? Does g_cmds only make the command appear in the console? How are g_cmds and bg_pmove connected?
Answering those will speed it up a lot.
g_cmd does not directly call into bg_pmove. What you're going to do is use G_SetAnim() to set the character's animation in g_cmd with a command and then alter movement code in pmove (when the animation actually filters down and is played).

Check out how the "debugSetBodyAnim" is done to see an idea of what you're doing for the command part of it.

Check out "broken parries" (IE OJP stuns) in the OJP Enhanced code to see an idea of how the pmove side of things should be handled.

No commands appearing in console by pressing TAB is client side.
Well, technically the client code needs to be updated so that it will show up as a command on the client side, but this isn't a requirement of getting it to work.

Faelion
04-08-2007, 11:21 PM
Thank you very much! I'll say if I get it running. (Sometime tomorrow probably)

Faelion
04-10-2007, 09:13 PM
I do not understand pmove still...
One: I don't get how it becomes associated with a g_cmd entry. Two: I don't understand exactly what it needs to be. (It is already an animation; I don't get what needs to be changed about it.)

I'd really like to know why it would not work if I only changed g_cmds. That might answer both at once.

edit: when I tried to build and see for myself, the files were saved as '.exp' files instead of '.dll' files. Why?