View Single Post
Old Bill
Junior Member
Join Date: Jun 2020
Old 08-01-2020 , 10:29   Re: [TF2] Custom Weapons 3 (Beta 2)
Reply With Quote #254

Quote:
I made an attribute that would replace the projectile of a demoman's pipe with a custom one. It is just fine, the model path is passed from the weapon's configuration file and it sets the projectile to it but the strangest thing is that the bool variable that sets the attribute true never go false (or be destroyed with OnEntityDestroyed) it just stays true after you change the weapon.

https://pastebin.com/KZrRwNVv

I believe it has something to do with projectiles being created over and over so it messes up the index or something. Maybe it has something to do with, maybe EntIndexToEntRef???
Fixed, I needed to use iWeapon instead of iClient for the variable and used this function to check if the attribute is present

https://pastebin.com/c7Wi42a8

Last edited by Old Bill; 08-01-2020 at 22:10.
Old Bill is offline