• Setting player animation through SWEP?
    2 replies, posted
Im making a custom melee weapon base but I ran into a problem with setting the animation. [code] self.Owner:AnimRestartGesture( GESTURE_SLOT_ATTACK_AND_RELOAD, ACT_HL2MP_GESTURE_RANGE_ATTACK_SLAM, true ) -- This works, but only the player himself can see the animation. [/code] [code] self.Owner:SetAnimation( PLAYER_ATTACK1 ) -- This works too, but can only play the animation relative to the holdtype. [/code]
You would have to create a CalcMainActivity hook from there to play whatever activity you want.
[img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/GM/DoAnimationEvent]GM:DoAnimationEvent[/url] works.
Sorry, you need to Log In to post a reply to this thread.