• Gmod check if player is doing an animation?
    4 replies, posted
function SWEP:Think()  loc=self.Owner:GetPos() enty = ents.FindInSphere(loc, 150) for index, ent in pairs(enty) do if ent:IsPlayer() and ent:Alive() and ent != self.Owner then  ent:DoAnimationEvent(1642) end end  The problem I have is that I can't find a function that check if the player is doing an animation. There is IsPlayingTaunt but it doesn't seem to work. The problem is that because this is under Think it literally spams the entity to do an animation so fast that it doesn't even play. That's why I want a function that can check if the player is doing an animation or not. Pls help More sh*t in think after (I didn't forget an end.)
Make a local variable like "isAnimating", start a timer using Entity/SequenceDuration, do some checks for whether or not the animation is playing based on how long it should be playing
How do I do that? I can't find out how to make it work with an Individual player etc.?
Check if Entity/GetCycle < 1
The problem is still there. It spams the animation so fast it doesn't play. It only plays the animation when I make the player go out of the sphere where it's not getting reset cause of a new animation call.
Sorry, you need to Log In to post a reply to this thread.