From an end user standpoint, 9-way and 8-way animations will end up looking the same. The only difference is in how you ( the coder ) has to use them, and also in how the models are compiled.
If the models you are using for your mod are using  "move_yaw" parameter, then you HAVE to use the 8-way animation code.
If the models are using the move_x and move_y parameters then you HAVE to use the 9-way code.

Both 8-way and 9-way use the following pieces of information.
1) MovementYAW : The direction of the players movement (relative to where he's aiming). This will range from 0 --> 360.   0 means he's going forward,  180 means he's walking backwards,   90 is strafing to the right, 270 to the left
2) MovementSpeed : The speed in which he's moving. This will vary from 0 --> maxspeed (depending on how fast u defined this in your mod)
3) IntendedSpeed of current animation: This "intended speed value" is something the animator should have embedded in the model. If you open up HLMV and select a particular animation (such as run), and then set the playbackrate to 1.0, you should see the top speed of the animation (usually it's around 250 --> 300). If you switch to another animation like walk, the top speed should be around 160. These values will vary depending on how the animator made his animations.


The difference in how these two pieces of information are used is as follows:
For 8-way animation: The code takes MovementYAW  and sets  the "move_yaw" parameter based on this. I believe it's basically a 1 --> 1 conversion as the "move_yaw" pose param ranges from 0 --> 360 also. It then takes MovementSpeed and sets Playbackrate() function to specify how fast to play the animation. This will vary between 0 --> 1.  The playbackrate value is detemined by comparing the player's movement speed with the current animation's intended speed value. If the player's movement speed is ZERO, then the code will blend to the ACT_IDLE sequence.

For 9-way animation: The code takes MovementYAW and MovementSpeed and IntendedSpeed  in conjunction to determine which values to set "move_x" and "move_y" to. It uses some tricky math (involving cosine), which you can see if you study the function  ComputePoseParam_MoveYaw(). To better understand how move_x, move_y works. Let's consider a few situations:
Player running forward at top speed:  move_x = 1.0,  move_y = 0.0
Player running forward at half speed:  move_x = 0.5,  move_y = 0.0
Player running to the right at top speed:  move_x = 0.0,  move_y = 1.0
Player running to the left at top speed:  move_x = 0.0,  move_y =   -1.0
Player standing still : move_X = 0.0,  move_y = 0.0

So that pretty much describes the difference between how 8-way, 9-way work. I prefer using 9-way for the following reasons:
- you don't have to blend in ACT_IDLE when the player stands still
- you don't have to adjust Playbackrate().

From and end user standpoint, they both look the same though. Your decision to use either 9-way or 8-way rests ENTIRELY on how the model was compiled. If you're using the standard alien swarm models, then ur stuck with 8-way. I'm pretty sure all Source games after DOD:Source use the 9-way system.   8-way is so 2004...

So to answer your original question:
How can I integrate the hl2mp aiming into the ASW player animstates without screwing up leg anims or anything ?
You'd have to recompile the ASW models to use "move_yaw" paremeter (which would require the original .smds for the player models). You wouldn't actually have to modify any of the animations, you just need to modify the .qc file so the sequences are compiled differently.

However, switching between 9-way and 8-way will not solve your problem. From what I understand, you want to be able to specify which direction the marine's gun is pointing ? For that you'd need to make new 9-way aim animations and create a "body_yaw" pose parameter.

On Aug 7, 2011, Psy_Commando <psycomma...@gmail.com> wrote:
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to