I get to teach a couple of friends about this topic.
The unfortunate part is I do not have a complete understanding of it all. LOL
I am getting a better understanding now about local and global commands.
Now a question about scripts, loops, conditions, etc.
In terms of keeping the impact and stress on the server FPS and performance, how do you determine which kinds of scripts should be run on the client and NOT the server; or which scripts should run only on the server; or which scripts should be allowed to remove the check at all and be ran on any machine?
It might help if we use a concrete example here.
An example for each situation would be best.
EXAMPLE:
Let's take Chaff/Flare Defense system script.
- In this implementation we had a ExecVM an .SQF file for each Helicopter.
- The .SQF file has a While Loop that runs until there is critical damage then stops
- The While Do Loop checks for a missile by contantly checking for a Vehicle's variable (e.g. _helo getVariable "missileincomming";
- This "missileincomming" variable is set through the EventHandler "IncomingMissile"
So as you can see, this While Do Loop continues to run basically until the Helo is destroyed.
Right now there is no Server or Client check at all.
My questions are this?
Does this mean the While Do loop is being run on the server CPU only by default thus causing server strain if there 60+ Helos flying around?
If it runs on the Server CPU only, can I reduce the server strain and force it to run on the Client Only without breaking functionality?
Is it possible that if one player jumps in the helo and then lands; gets out; and another player Jumps in, does the While Do loop and script switch from being run on that client to the new client?
As you can see I need some guidance here from the GURU of wisdom.
Thanks for your help in advance!