• GetSequenceActivity() returning -1 on clients for custom models.
    1 replies, posted
I have a custom model, animated with the gmod playermodel animations, with extra custom animations added to it. I have activities for these animations, so I can use [code]model:GetSequenceActivity(model:LookupSequence( "block" ))[/code] When I host a server or play singleplayer, this works flawlessly. It also works if I host a server, then connect to another. But when I connect to a server and it sets the model to the player, there are no activities associated with the animations on my client. I used this code to test. [code] local DermaPanel = vgui.Create( "DFrame" ) DermaPanel:SetPos( 50,50 ) DermaPanel:SetSize( 500, 700 ) DermaPanel:SetTitle( "Anims List" ) DermaPanel:SetVisible( true ) DermaPanel:SetDraggable( true ) DermaPanel:ShowCloseButton( true ) DermaPanel:MakePopup() local DermaListView = vgui.Create("DListView") DermaListView:SetParent(DermaPanel) DermaListView:SetPos(25, 50) DermaListView:SetSize(450, 625) DermaListView:SetMultiSelect(false) DermaListView:AddColumn("ID") -- Add column DermaListView:AddColumn("Anim") DermaListView:AddColumn("ACT") for i=0, 2406 do local self = LocalPlayer():GetEyeTrace().Entity local str = self:GetSequenceName( i ) if(str != "Unknown") then DermaListView:AddLine(i,str,self:GetSequenceActivity(self:LookupSequence( str)) .. "") -- Add lines end end [/code] This is the result for the client that did not host before connecting. [img]http://puu.sh/8ggh0.png[/img] This is the result for client that did host a server before connecting, or the singleplayer / mp listen server host. [img]http://puu.sh/8ggdG.png[/img] Any clue on what I could do about this?
For now I'm working around it by using sequences with a customized CalcMainActivity, but I can't use this for gestures. If anyone knows how to play a gesture with the sequence and not the Activity, please do let me know.
Sorry, you need to Log In to post a reply to this thread.