Different 3rd person player anims for different weapons

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

pospi

New Member
Jun 30, 2003
298
0
0
www.pospi.cjb.net
Hi guys,

I'm just starting on this and need a few pointers to get me going.
Is it possible to control player animations through weapon classes? Ive tried setting idleAnim, restAnim etc, and fireAnims in weaponFire, but none of these properties seem to have any bearing on what animations the character actually plays in 3rd person.

I need weapons to have completely different fire cycles, for example maybe a mine weapon plays a crouch and drop animation, a gun plays a western style cock and fire and a boomerang plays an arm swing.

I was thinking if there is no other way around it to use a custom pawn animating class and do checks on which weapon is being held, but if there is any better way please let me know.

cheers!
 

[SAS]Solid Snake

New Member
Jun 7, 2002
2,633
0
0
40
New Zealand
www.digitalconfectioners.com
In the early builds of Chaos Engine I had weapons which made the player do different animations. Because this mod was originally a 3rd person W40K setting Diablo 2 type mode, it was important to have the weapons and animations in sync.

Anyways, first of all, I used MeowCat's script animation code to over ride the default native Pawn animation code that Epic/DE put in. Second instead of having the pawn tell what animation to play, I made the pawn get the weapon's animation name of what it should play. Thus each and every type of weapon had its own pawn firing/idle/run/crouch/etc animation which was insync for all of its weapon.
 

pospi

New Member
Jun 30, 2003
298
0
0
www.pospi.cjb.net
I like that, sounds like a great way to do things.

Already been playing with UScriptAnimPawn a bit and its good to know the right place to be doing everything.
 

[SAS]Solid Snake

New Member
Jun 7, 2002
2,633
0
0
40
New Zealand
www.digitalconfectioners.com
Its just the thinking other way around. Instead of the pawn searching for what it should do, objects should tell it what to do. Kind of like the AI in 'The Sims'. Instead of each sim decided what it should do with itself with the objects in the room, the objects tell the sim what to do.
 

pospi

New Member
Jun 30, 2003
298
0
0
www.pospi.cjb.net
Did you have any problems with looping fire animations for rapidfire weapons in Chaos Engine?

Basically ive just overloaded functions from the pawn classes that handle animation and stuck them in UScriptAnimPawn as well. The relevant function is StartFiring(), which takes parameters for bHeavy weapons and bRapidFire firemodes and is supposed to select the right animation and either play it once (bRapidFire=false) or loop it (bRapidFire=true).

Mine just doesnt seem to loop for me, instead it tends to play once if standing still or not much at all if running. Perhaps the animation is being stopped by a call to another playAnim() which would previously have been handled some way differently in native code?
 

Hazard.ep

New Member
Oct 7, 2003
166
0
0
I had such a problem when coding behavior for my melee attack anims. The looping anims where stopped by StopFiring() in the pawn, called by a weaponfire that is not set to bWaitForRelease. Still you will have the problem, that looping anims call the animend notification just once after they played for the first time, and you need to override the anim with another one (or 'None') to stop them after that. See if this works, otherwise I could send you some of my code as example...