Can't play my custom animation on a SEND?

Hey Guys! So basically I’ve created a model along with a custom animation for it.
What I found out was that I cannot seem to play the animation using entity:SetSequence() but if I create prop_dynamic, then the animation plays.

I’m using the code below to play “FLARE_BURN” on my entity:



local seq = self:LookupSequence( "FLARE_BURN" )
self:ClearPoseParameters()
self:ResetSequenceInfo()
self:SetPlaybackRate( 1.0 )
self:ResetSequence( seq )
self:SetCycle( 0 )
self:SetSequence(seq)


Don’t use SetSequence, use ResetSequence.

Also post more of the code ( preferably all of it ).

Your SENT must be of anim type, and it must have the automatic frame advance thing.

Here’s my “Animatable” SENT from the Easy Animation Tool:



AddCSLuaFile()

ENT.Base = "base_entity"
ENT.Type = "anim"
ENT.RenderGroup = RENDERGROUP_BOTH

ENT.AutomaticFrameAdvance = true

function ENT:Initialize()
	self:SetSolid( SOLID_OBB )
end

function ENT:Think()
	self:NextThink( CurTime() )
	return true
end

if ( SERVER ) then return end

function ENT:Draw()
	self:DrawModel()
end

function ENT:DrawTranslucent()
	self:Draw()
end


Notice the ENT:Think function, that is mandatory.

That worked! My entity type wasn’t set to “anim”.
Thanks Rubat.