+ Reply to Thread
Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 26

Thread: [E2]HoloAnim Extension

  1. #11
    Wire Sofaking Wizard of Ass's Avatar
    Join Date
    May 2009
    Location
    Germany Bremerhaven
    Posts
    1,044

    Default Re: [E2]HoloAnim Extension

    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.
    Last edited by Wizard of Ass; 08-11-2010 at 04:17 AM. Reason: Replaced "return nil" with "return" also fixed returning nil instead of a 0
    seriously getting serious

  2. #12
    Wire Amateur rouing3's Avatar
    Join Date
    May 2010
    Posts
    35

    Default Re: [E2]HoloAnim Extension

    hyjack much?

  3. #13
    Ursus maritimus Drunkie's Avatar
    Join Date
    Feb 2009
    Location
    Canada
    Posts
    5,661
    Blog Entries
    1

    Default Re: [E2]HoloAnim Extension

    I remember his extension from awhile ago too.

  4. #14
    Wirererer ben1066's Avatar
    Join Date
    Aug 2009
    Posts
    151

    Default Re: [E2]HoloAnim Extension

    I can change this easily to allow such, but I never saw the use in set rather than reset seeing as you can set the start, also, I just added pose. Also I doubt the anims he did would have been smooth as for anims to be optimal they require changes to the entity they are applied to, specificaly ENT:Think needs to be triggered as fast as it can.

    Make sure you run the Think function every frame. Otherwise, animations will look choppy:

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

  5. #15
    Wire Sofaking Wizard of Ass's Avatar
    Join Date
    May 2009
    Location
    Germany Bremerhaven
    Posts
    1,044

    Default Re: [E2]HoloAnim Extension

    Quote Originally Posted by ben1066 View Post
    I can change this easily to allow such, but I never saw the use in set rather than reset seeing as you can set the start, also, I just added pose. Also I doubt the anims he did would have been smooth as for anims to be optimal they require changes to the entity they are applied to, specificaly ENT:Think needs to be triggered as fast as it can.
    Did you even test my extension before writing that ?

    Be sure I tested that all the way it works flawless with prop_physics e2's and any other entity thats based on "base_anim"(that are pretty much all entities) works perfect.

    In short: You don't need specialised entities at all.

    Also you should use the resetSequence function rather than setSequence otherwise anims can mess up.
    seriously getting serious

  6. #16
    Wire Amateur Teh Reborn Devil's Avatar
    Join Date
    Jun 2010
    Location
    Norway, Larvik
    Posts
    99

    Default Re: [E2]HoloAnim Extension

    The holoSetPose function is awesome. I messed around with holoAnim and holoSetPose and made a working portal turret. Also got sounds and laser. Going to add more sounds and do some finishing touches to the turrets and then I'll release it.
    E2 is awesome <3

  7. #17
    Wirererer ben1066's Avatar
    Join Date
    Aug 2009
    Posts
    151

    Default Re: [E2]HoloAnim Extension

    Awesome, hopfully things such as that can encourage more people to use this extension.

  8. #18
    Glorious Golden Faggot. TylerB's Avatar
    Join Date
    Mar 2010
    Location
    Minnesota, US
    Posts
    1,112

    Default Re: [E2]HoloAnim Extension

    Holy Shit!

    Nice Job!

  9. #19
    Wirererer ben1066's Avatar
    Join Date
    Aug 2009
    Posts
    151

    Default Re: [E2]HoloAnim Extension

    Thanks, need more servers running this though D:

  10. #20
    Wire Sofaking Wizard of Ass's Avatar
    Join Date
    May 2009
    Location
    Germany Bremerhaven
    Posts
    1,044

    Default Re: [E2]HoloAnim Extension

    As I said, for me its a stupid idea to limit it to holograms since there is nothing really abusable about this extension(except you manage it to set a models animation x hundred times a second lol).

    If you can use it on all entities you can also easily use it with holos...
    seriously getting serious

+ Reply to Thread
Page 2 of 3 FirstFirst 123 LastLast

LinkBacks (?)

  1. 10-31-2010, 05:08 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots