• SWEP Bodygroups don't appear in Worldmodel
    8 replies, posted
Hello, I have just mounted my SWEPs to a new base, and attached the bodygroup's to the view model, but the bodygroups on my SWEPs do not appear in the world model, just the view model. Does anyone have any idea how to fix this? Thanks.
You must set the bodygroups on the world model separately by setting them on the weapon object itself, not the viewmodel.
What do you mean "attached the bodygroups"? Bodygroups are part of the model, they can came as attachments (sights, silencers, etc.) but all you have to do use either the Bodygroup tool or Lua commands to change the bodygroup. More specifically to your dilemma however, SWeps use two models, a view models (written as v_modelnamehere) and world models (written as w_modelnamehere). Just because you've changed the way the view model looks does not mean that the world model will reflect that. View and world models are independent from one another and do not rely on one another. That's not to say they aren't related, they just don't affect one another.
Sorry for the late response, but I could have explained better. I was tired when writing this. Basically, the view model and word model have body groups, but the world model bodygroups do not show up when equipping the swep that is showing the view model body groups. SWEP View-Model bodygroups work, world-model's dont.
Are you using a spcific weapon base like Customizable Weaponry 1 or 2?
I'm using a SWB Base, but may be switching soon. Would you happen to have any recommendations for a new weapon base?
Customizable Weaponry 2 is the best, in my opinion, as it lets you add attachments through bodygroups and through the Swep Construction Kit, supports changing the weapon's stats on the fly and (from what I've heard) it runs well for people with high pings on servers.
Would it work ok with Nutscript? Currently using this schema to develop SWEP's and stuff. EDIT: I'm trying to convert a weapon-base from another game-mode over to nutscript, but it's proving to be rather complicated, so if anyone wishes to assist then please let me know!
I apologize for the bump, but - seem to have the same problem, and - since this thread is unresolved - decided not to make a new one. The SWEP is directly using a shared.lua, calling the functions inside it: [CODE]function SWEP:Deploy() self.Owner:GetViewModel():SetBodygroup(1, 2) return true end function SWEP:Holster() self.Owner:GetViewModel():SetBodygroup(1, 0) return true end [/CODE] It works fine with the V_model, however - not sure how it's supposed to select the w_ one also. Edit: Solved. [Code] self:SetBodygroup(1, 2) [/code] I'm too silly.
Sorry, you need to Log In to post a reply to this thread.