rendered paste body-- THIS WORKS:
local PlayIdle = 1
function SWEP:PlayIdleAnim( SWEP )
if PlayIdle == 1 then
self.Owner:ChatPrint(" DEBUG: Starting Idle Animation 1")
self.Weapon:SendWeaponAnim( ACT_VM_IDLE )
PlayIdle = 2
elseif PlayIdle == 2 then
self.Owner:ChatPrint(" DEBUG: Starting Idle Animation 2")
self.Weapon:SendWeaponAnim( ACT_VM_DRAW )
PlayIdle = 1
else
self.Owner:ChatPrint(" DEBUG: ERROR!")
end
end
-- THIS DOESN'T WORK:
function SWEP:PlayIdleAnim( SWEP )
self.Owner:ChatPrint(" DEBUG: Starting Idle Animation 1")
self.Weapon:SendWeaponAnim( ACT_VM_IDLE )
end
-- NEITHER DOES THIS:
function SWEP:PlayIdleAnim( SWEP )
self.Owner:ChatPrint(" DEBUG: Starting Idle Animation 1")
self.Weapon:SendWeaponAnim( ACT_VM_DRAW )
self.Weapon:SendWeaponAnim( ACT_VM_IDLE )
end
-- IN INIT FUNCTION:
timer.Create( "IdleAnimTimer", 15, 0, self.PlayIdleAnim, self.Weapon )