I have a weapon here, and I've created a poseparameter which blends between an idle animation and a running animation.
The question is, how would I be able to set the idle animation of a swep, set the pose parameter to blend into the running animation (when the player's velocity increases), then after I take a shot it goes back to the idle animation?
[QUOTE=ralle105;20177054][b][url=wiki.garrysmod.com/?title=Entity.SetPoseParameter]Entity.SetPoseParameter [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b][/QUOTE]
I know about that, but I can't do it correctly.
[code]
function SWEP:Think()
local Speed = self.Owner:GetVelocity():Length()
local OnGround = self.Owner:OnGround()
if ( OnGround ) and ( Speed > 20 ) then
self.Weapon:SendWeaponAnim("ACT_VM_IDLE")
self.Weapon:SetPoseParameter( "move_x", 0.4 )
end
[/code]
This bit right here doesn't work.
Sorry, you need to Log In to post a reply to this thread.