Dual wielding?

Just read today’s blogpost and it was really cool! The amount of progress you’ve lot made is absolutely amazing!

Within the section on the inventory system it mentions having an object for the Active Entity. Would it be possible to have multiple active entities to allow for more dynamic use of inventory objects? e.g. dual wielding of weapons which are separate objects in the inventory, or having a health kit and a weapon active at once.

I understand that this could be circumnavigated fairly easily by any addon (by having dual wielded guns count as a single inventory object), but obviously this could create conflicts if you wanted to dual wield weapons from two addons.

1 Like

It looks to be perfectly doable, you’d just have to add a new field on the player to track the second ActiveChild and overwrite TickActiveChild to tick both of them at the same time.

I wouldn’t expect this to be a solution that works for every weapon out of the box though, since without special consideration you’d end up with one mouse click controlling both at the same time, regardless of whether you’re holding two weapons or a weapon and a grenade.

1 Like

Definitely sounds like something creators should be solving, not the devs.

Duel wielding systems are not hard to make, so long as you build your weapons system with that functionality in mind from the get-go.

1 Like

At the same time Gmod has a “dual” holdtype, so at least there’s some precedence when it comes to Garry adding dual-wielding, even thought that may have been just a port from CS:GO or HL2:DM

1 Like

Yeah it should be possible for a competent coder to implement


And the search continues.

1 Like