Jump to content

Home

Using the 180 degrees animation.


Faelion

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...