Author Topic: The weapon I made overwrites the Gun  (Read 1259 times)

When I check off my weapon on the list Gun isnt on the item list but instead NewGun (Temporary Name) is there and that gun works and everything but I just need to know why it overwrites the normal Gun.
Note:I also used the normal pistol script thats in Gun but edited its name so if someone could tell me
were to change it that would be helpful

Did you change the names of the datablock (gun_____) parts to the name of your gun?

Well I dont see one that would make it the same as the default gun like there isnt (gunGun) I did change the ui name to NewGun but I just dont understand why it overwrites it could you possibly just show me the part of normal server.cs in the Gun were to change it??

What you're doing is changing the uiName and not the datablocks, then. The game loads the default gun's datablocks, then it loads your gun and thinks "oh these datablocks are the same, we'll just replace the data".

Not far before the uiName, there should be a line saying datablock(gunItem) or something. Change THAT, too.

I see I saw the (GunItem) but I assumed Gun just meant that it was a gun type of weapon so I should change it to (NewGunItem) perhaps?

Yes. Do the same with gunImage, gunProjectile, each of the gun___Sounds and the emitter datablocks.

So instead of Gun I use NewGun?Ok thats helpful if it works im gonna lock the topic =D