All pastes #591748 Raw Edit

Untitled

public text v1 · immutable
#591748 ·published 2007-06-27 11:29 UTC
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 )