• Help making the player move forward in a roll animation
    2 replies, posted
So i made a roll sequence to my weapon mod but i dont really know how to make my player move forward when i do the animation. I searched on the wiki but i didnt get what i was really looking for. Also another thing, i started like two days ago modding GMOD and i didnt see anything about attaching a camera to one of my viewmodel bones which would be useful on my animations but i think i would lost the sway and bob effects if theres someway to do it, so i used the viewpunch command and it works pretty well when i roll but i really need the camera to go a little bit down instead to just rotating. I think those are really basic questions but oh well, im newbie with trouble searching for answers :v Thanks in advance for anyone whocan help me
For moving the player, something like GM/SetupMove would probably be ideal. As for attaching a camera to viewmodel bone/attachment, there is currently a bug in GMod which makes this not work.
Thank you so much for the information and i have a veery dumb question For the GM/Setup Move how can i properly put into my code (the one below)? I tryied it before adding like a retarded and when i pressed the key my player was just moving forward like when you press W, thats not what i wanted and also even removing the code my player was doing that with outher guns lmao. What i really need is like, Press my Roll command and my player move like 3-4 meters forward, move not teleport or get more velocity. also too bad that the cam attachment does not work :/ , so as you can see im doing the viewpunch and well it leaves a very good feeling when you roll but theres a way to with the punch rotation make the camera go a little bit down like if you were crouching? the forward roll is something like this: if self.Owner:KeyDown( IN_ALT1 ) and self.Owner:KeyDown( IN_FORWARD ) and self.Iron == 0 and self.Reloading == 0 then self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK_4 ) self.Weapon:EmitSound( "Peacekeeper_Roll_Spin" ) self.Weapon:SetClip1( self.Primary.ClipSize ) self.Owner:ViewPunch( Angle( 20, 0, 0 )) self:SetNextPrimaryFire( CurTime() + 0.2 ) self:SetNextSecondaryFire( CurTime() + 0.2 ) return end
Sorry, you need to Log In to post a reply to this thread.