• Is there a build in running animation for SWEPS I can access?
    7 replies, posted
I was wondering how to add a running animation to my SWEP (more of changing the model's offset), is there a base I should use that has access to that?
What i do is similar to how the iron sights work only it puts it in the position and angle that i want for the sprinting.
Yea, that's what I'm looking for. How would I go about doing that?
[b][url=wiki.garrysmod.com/?title=SWEP.GetViewModelPosition]SWEP.GetViewModelPosition [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]
So, would this just be added to the SWEP code, or in another function? I'm used to AS3, so this is kinda new to me.
In the SWEP's cl_init.lua you would add this as a function. function SWEP:GetViewModelPosition(pos,ang) //whatever end
What would the function look like? I can't find anything on the Gmod Wiki about using this. Is there a If,Then,Else statement I should use?
Take a look at how other weapons do it.
Sorry, you need to Log In to post a reply to this thread.