No announcement yet.


  • Filter
  • Time
  • Show
Clear All
new posts


    Is it possible to convert a weapon animation into code, in order to make your own universal run-bob or crouch-walk anims?

    uhhhhhhhhhhhhhhhhhhhhhhhhhhh. *thinks* Huh? :bulb:

    You mean you want to force an animation to play for all weapons? Cant you just..uh..code it that way? I know youre making a TC, so this should be no problem for you guys. Or maybe I'm not understanding (more likely).

    I mean, anims are referenced in code by a name, nothing more. If the mesh a player has (or a weapon, or whatever) has the animation that is requested to play, it plays. Every mesh has their anims named the same, so it works fine.

    What you might want, though, is more anims. For example, a different anim to play for each weapon, or something. THIS is something I know a bit about. If thats what you were asking, then its fairly simple, and I will elaborate more if you want.


      What he basically wants to know is if he does one animation bob (for while the player runs say) can it be appolied to all weapons on top of any other animations (like say shooting animation), or would we have to have a seperate run animation for each weapon (and how would we play it AND the shooting animations at the same time, my guess animation blending???)

      the reason being he really dislikes the coded bob, but finds no bob to be worse (and I'm not sure why he does not like the idea of a newly coded bob...)


        Okay, well the view bob you feel in first person actually is not an animation at all, but a simple pi/raidian trick of CheckBob() which is added to the camera position in the player controller. In fact, animations play no part in the camera movement at all, if that is what you mean.

        If you mean simply playing multiple animations, yes that can be done with blending. Bascially animations have "channels," and each channel plays an animation. There is fade in time, fade out time, weight, etc. all assigned to these channels. Channel 0 is always played "stronger" than channel 1, and so on for channel 2, etc., lower numbers are "stronger." So, for example, you can play a run on channel 0, and play a "bob" animation on channel 4, which might provide perfect blending for you. Animations always play on the entire skeleton, even if there is no movement being produced by the animation (an important concept).

        Shooting anims dont actually have the player's arms "come from a run" and then "grab the gun and fire." Instead, the animations is just the player shooting over and over. The blending is performed at the beginning, so that it takes about .5 to .7 seconds for the anim to be at full strength. The result is you see the existing animation blend into the new animation (both are still playing if you played them on different channels), with the weapon come up or down or wherever to be in the firing position, and then the player start firing. There are also lots of hooks in the weapon code for animations at different times, example a shotgun can have an anim play between every fire to **** the weapon, or however you like.