• How to nil out animations... or something?
    3 replies, posted
I tried to figure this out a while ago then eventually just gave up. In my sweps with ironsights, I want to stabilize the weapon viewmodel while aiming by freezing the animation, or something like that. What I've tried: function SWEP:ViewModelDrawn(vm) if IsValid(vm) then vm:SetCycle(0) self:SetCycle(0) end end Probably a bad thing to do, but calling this in Think: function SWEP:StableVM() local vm = self.Owner:GetViewModel() if IsValid(vm) then vm:SetCycle(0) print("Fucker") end end Nothing happens. I've used print to make sure the code is ran, the top one is always ran Client, the Think one is always called Shared. They are being called, but I guess SetCycle isn't working? Help?
Try changing Entity/SetPlaybackRate to 0 during the ironsight state
ViewModel.SetCycle does nothing · Issue #3038 · Facepunch/garrys.. Try Gmod4phun's suggestion.
Thanks! That's the exact function I was looking for I knew something like it existed but had trouble trying to find it.
Sorry, you need to Log In to post a reply to this thread.