Hey im working on a gun system and took a new direction to it.
I just want your general thoughts or possible improvments on it.
and a general idea on what to do with renderstep function.
1 messages · Page 1 of 1 (latest)
Hey im working on a gun system and took a new direction to it.
I just want your general thoughts or possible improvments on it.
and a general idea on what to do with renderstep function.
I should of prob included the renderstep I can do it and Im using spring module for sway and what not but im wondering is there a cleaner way to do it than having over 450 lines.
It's not really scale and maintainable.
I assume FPS is either client script and server script which in this point, it's more likely to be server script.
You hardcode guns , which is not a good idea
Instead of dinamically register them
I havent seen other scripts so thats just my feedbacks
The hardcoded guns are gonna be switched out as soon as I get a base of the system down I added a note claiming it, The scripts I sent you there two of them are modules and one is the client script.
the module that handles ammo will be used on the client and verified via the server
Andd... I think the object should handle things itself
Like FPS:Subtract(weaponName, amount), can be replaced
so wym object should handle things itself?
You can create a gun class that handle ammo
So you dont have to manually call Subtract everywhere
With the gun class handling itself, it becomes much better
Except if your FPS is a class
But it looks like it's not, more like a service..
Ohh so like turn the actual weapon into a class then store ammo under that
** You are now Level 1! **
Yeah
So like Weapon:ConsumeAmmo(1)
Instead of Weapons[WeaponName]["Ammo"] -= 1