Jump to content
Sign in to follow this  
Bulldog72

A gamelogic named "server"...

Recommended Posts

I am seeing such a logic in a lot missions I've looked into. Not always. But often.

It has no init line and from what I can tell it is not referenced in any of the mission sqf scripts or used in any way. It just "is".

Why? What is it for?

Is there something special about the name or something? Perhaps it is doing something behind the curtains I fail to see?

Share this post


Link to post
Share on other sites

If you want a script, or parts of a script, run only on a server and not on the clients you can do a check to see if theres a gamelogic present. Gamelogics are only on the server, not on the clients. To find out if there are gamelogics on the machine you can name one and check if its present. So its very common to give a gamelogic the name 'server' and then check in a script if "server" exist or not. If it return false the script is run on a client, if it returns true the script is run on the server.

You can name a gamelogic whatever and check for that name, but 'server' is commonly used.

Share this post


Link to post
Share on other sites

It's outdated now, because isServer provides the same functionality, without the need to place the logic on a mission anymore

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×