I just do this just by normal coding.
So if key is pressed then check if you have correct keyframe(s) to execute the action.
Enhanced Animations are really a must buy for this, you can actually blend animations and do a lot more with the with it.
I store important keyframes in arrays, so I can use them in code:
Like:
Weapon(0).ShootEnd=6
Weapon(0).Eject=31
Weapon(0).BoltPull=40
Weapon(0).RelHnd=56
Weapon(0).BoltReturn=137
These are just the keyframes of the piled animation in 3ds max.
Another thing for example:
if controlkey()=1 then if EnAn_oacGetLimbIsActive(Playeroac,LimbLLeg)=0
animate_legs(KF_Crouch, KF_WalkCrouch1)
EnAn_oacPlayAnim Playeroac, 1, BodyAnim, 0, KF_Crouch, KF_WalkCrouch1, 0,1
endif
For checking keyframes specific keyframes I also use function
function handsfree()
hfree=0
if CurrentHandsFrame=0 then hfree=1 : exitfunction hfree
if CurrentHandsFrame=Weapon(CurrentWeapon).TrimmingStart-1 then hfree=1 : exitfunction hfree
if CurrentHandsFrame=Weapon(CurrentWeapon).ArmingEnd then hfree=1 : exitfunction hfree
if CurrentHandsFrame=Weapon(CurrentWeapon).EndZooming then hfree=1 : exitfunction hfree
if CurrentHandsFrame=StartTrimming then hfree=1 : exitfunction hfree
if CurrentHandsFrame=Weapon(CurrentWeapon).ShootEnd then if BulletsLeft(CurrentWeapon)=0 then hfree=1 : exitfunction hfree
if CurrentHandsFrame=Weapon(CurrentWeapon).EndTrimming then hfree=1 : exitfunction hfree
if CurrentHandsFrame=KF_WalkProne1 then hfree=1 : exitfunction hfree
if CurrentHandsFrame=KF_UnProne2 then hfree=1 : exitfunction hfree
endfunction hfree
Looks messy, but it just checks if current hand frame is a specific keyframe and the funtion will return 1 or 0, whether hands are free to perform that action or not.
You can also check if animation is playing when you need to perform specific action, like the walking. Character can't walk unless the frame is 0 or something another specific keyframe. If it's not, then you can't do the action.