Actually Jeremydeath made a animation extension in general ages ago.
But nobody cared about it but now" OMGZ HOLO ANIMATIONS DO WANT!".
Something is wrong here...
Code:
e2function void entity:sequenceSet(number Sequence)
if not validEntity(this) then return end
if not isOwner(self,this) then return end
if Sequence < 0 then return end
if not this.AutomaticFrameAdvance then
this.AutomaticFrameAdvance = true
end
this:SetSequence(math.floor(Sequence))
end
e2function void entity:sequenceReset(number Sequence)
if not validEntity(this) then return end
if not isOwner(self,this) then return end
if Sequence < 0 then return end
if not this.AutomaticFrameAdvance then
this.AutomaticFrameAdvance = true
end
this:ResetSequence(math.floor(Sequence))
end
e2function void entity:sequenceSet(number Sequence, number Speed)
if not validEntity(this) then return end
if not isOwner(self,this) then return end
if Sequence < 0 then return end
if not this.AutomaticFrameAdvance then
this.AutomaticFrameAdvance = true
end
this:SetSequence(math.floor(Sequence))
this:SetPlaybackRate( math.max(Speed,0) )
end
e2function void entity:sequenceReset(number Sequence, number Speed)
if not validEntity(this) then return end
if not isOwner(self,this) then return end
if Sequence < 0 then return end
if not this.AutomaticFrameAdvance then
this.AutomaticFrameAdvance = true
end
this:ResetSequence(math.floor(Sequence))
this:SetPlaybackRate( math.max(Speed,0) )
end
e2function number entity:sequenceGet()
if not validEntity(this) then return 0 end
if not isOwner(self,this) then return 0 end
return this:GetSequence() or 0
end
e2function number entity:sequenceLookup(string SequenceName)
if not validEntity(this) then return 0 end
if not isOwner(self,this) then return 0 end
if(string.Trim(SequenceName) == "") then
return 0
else
return this:LookupSequence(string.Trim(SequenceName)) or 0
end
end
e2function void entity:setPoseParameter(string paramName, number paramValue)
if not validEntity(this) then return end
if not isOwner(self,this) then return end
this:SetPoseParameter(paramName,paramValue)
end
e2function number entity:getPoseParameter(string paramName)
if not validEntity(this) then return nil end
return this:GetPoseParameter(paramName)
end
e2function void entity:sequenceSetCycle(number frame)
if not validEntity(this) then return end
if not isOwner(self,this) then return end
if not this.AutomaticFrameAdvance then
this.AutomaticFrameAdvance = true
end
this:SetCycle(frame)
end
e2function number entity:sequenceGetDuration()
if not validEntity(this) then return 0 end
return this:SequenceDuration() or 0
end This extension contains all known sequence functions PLUS SetPoseParameters which allow you to set the aim of the portal or hl2 turrets.
Also this extension is not restricted to holograms because restricting it to holograms would be totally retardet.
Bookmarks