View Single Post
SirBlockles
Junior Member
Join Date: Mar 2017
Location: /home/muddy
Old 07-08-2020 , 15:33   Re: [TF2] Custom Weapons 3 (Beta 2)
Reply With Quote #253

Quote:
Originally Posted by nosoop View Post
The CW3 plugin interface has issues applying attributes to non-weapon entities. Had to make a note of that for Custom Attributes myself.

Not sure since actually using CW3 is out of my expertise, but you may need to do one of the following:
-snip-
I tried these out - using attributes over cw3_attributes didn't seem to help, and wearable_razorback is considered a null item.

HOWEVER, I did find a solution, at least in my specific use case (writing here in case anyone else wants a passive worn item):

Make the item a builder, and DO NOT include the weapon_is_passive attribute. If you keep the passive attribute, it switches the player from his primary to his melee constantly (since tf_weapon_builder is the weapon for the engy toolbox/spy sapper and proabably thinks you just built something), but this is not a problem if the weapon isn't passive.

As a result from using this, if the player tries using the weapon in this slot, the viewmodel will flash invisible for like a single game frame and his weapon won't change, and in third person their arms will twitch as they try to pull out a toolbox for a split second, but I've found that this effect is completely clientside and doesn't even show for anyone else. Also, when hauling an already-deployed building (but interestingly, not while placing one from scratch), the toolbox viewmodel is invisible, but not the building's blueprint.

The only downside aside from the minor visual bugs, is that a weapon equipped in this fashion eats mousewheel scrolls to switch weapon, meaning you have to scroll hard enough to "push past it." But, for people who use the keyboard to swap weapons, this shouldn't be a huge issue.

This method works for all classes except the Spy, who believes the weapon to be a Sapper.
__________________

Last edited by SirBlockles; 07-08-2020 at 15:33.
SirBlockles is offline
Send a message via Skype™ to SirBlockles