Jump to content
Sign in to follow this  
General Barron

help with class Actions (anims)

Recommended Posts

ARG!!! ARG!!! ARG!!!

I HATE ANIMATIONS!!!

I HATE CONFIGURING ANIMATIONS!!!

I HATE IT SO MUCH!!!

*whew*

Now that I got that out of my system, I'll ask my question. I'm trying to configure some animations, a task which I THOUGHT I had figured out. Anyway, I'm trying to create a very simple,custom walk-like set of anims, if you will. Basically I've got two anims: a standing, static animation, and a walking animation. I'm trying to configure it so that when you press the forward key, it plays the walking animation.

Obviously this should be configured in the Actions class, right? However, whatever I do, I can't get the darn thing to work, even though it seems like it should. I can post some specifics in terms of the config, but first I'll wait to see if anyone even knows anything about this. Even if you just know of a tutorial on anim configs, please post me the link. Thanks. smile_o.gif

Share this post


Link to post
Share on other sites

I am not sure to understand

You want to replace the BIS animation that play when you press forward ?

Or add a new animation (like leaning as it has been discussed somewhere in the forum) to the already existing one without replacing anything ?

I think in that case the keyscript from Hardrock should be usefull in some ways, but you already know it smile_o.gif

To configure the animation in the config, you can give a look there

But, to assign it to a key is out of my league.

Share this post


Link to post
Share on other sites

Okay, here's the deal. If you look in the cfgMoves, in the "States" class, you will see that all animations have the property "actions". For example, the state "combat" has this:

actions = CombatActions;

Now, if you look back up near the top of the file, you will see a big class called "class actions". Within this class you will find, among others, the class "CombatActions", which, as we just saw, is used by the "combat" animation.

Looking in the class "CombatActions", you will see that it basically tells ofp what to do when a unit does any action, such as move forward, throw a grenade, reload, pull out an AT weapon, etc. This is where the animations are mapped to keyes, essentially. Try replacing the line:

walkF="CombatWalkF";

with

walkF="CombatWalkB";

and you will see that whenever you try to move forward, you will instead move backwards. The same thing will happen to the AI.

What I'm doing is improving a body drag script/animation that I was working on. Before, I only had a constant looping animation that would propel the unit forward (basically walking). What I want to do is make it so the unit can stop or move whenever he wants, just like regular walking. This should just be a matter of creating the appropriate "actions" class, and then assigning that class to my animations.

"Should", of course, is the key word. It looks like it should work, like I'm doing everything right, but it doesn't work. That's why I'm hoping that someone who has experience with this will happen upon this thread, and be able to help me through this...

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×