Wall of text:
Alright, I was starting on joining it to the player on the server-side, but i quickly realized that I would probably have to essentially redo my entire system. So instead, I had the weapon send the serverside command/function over to the mod system weapon. which handles the buff system class. from there, it takes the data from the serverside and does a triggerclient to send it over to the clientside. I would have sent it directly to the class and done that, but of course, for whatever reason, you're not able to send serverside<->clientside triggers in classes. so instead, from there, i then send it over to the class. using this method, i can clientside the entire process unless a serverside trigger is required (i.e. findplayer). Which should help reduce server strain in the long run. even if it's by a small amount. compared to serversiding most of it.
Quote:
Originally Posted by MrOmega
I agree with the class method, but I perfered to use findweapon() so I know what I'm referencing. 
|
I prefer my method. not only is there less typing, but, if done properly, will give you all the information you need at a glance. for example, to solve your problem, the system i have to handle my weapon data is called -Serverfunctions/-WeaponSystem. I then put WeaponSystem = this; in the onCreated function, so that way, when i see WeaponSystem.blah(blah,blah), I know that's it's sending data to my weapon system because it's easily identifiable that way. and in this case, BuffSystem (the class is called buffsystem), if I see BuffSystem.addbuff(blah) i know exactly what the script is doing. using the buff system to add a buff, of course
ANYWAY
Now that I have this, for the most part, working, I have one more related issue that I've been having trouble with lately. It seems that my ModSystem (the weapon joined to buffsystem) won't apply any buff effects to anyone who has just logged in. this problem is resolved once i open up the weapon, and click "Apply" after they've logged in. And I need to repeat this every time a player logs in... So does anyone have any idea what might be the culprit? is there any built in function to update the weapon so i can put it in an onCreated or something, instead of doing this process every time?
edit: nvm i managed to fix this by doing player.ModSystem.onCreated() in the control npc when the player logs in. still dont know why i had to do this though.