Jump to content

How do you run task scripts on the server side?


June

Recommended Posts

Hope this is not too late for you, but have a look at the BIKI entry on the Arma 3 Task Framework:

https://community.bistudio.com/wiki/Arma_3_Task_Framework

 

The article contains almost everything you need in regards to relevant functions and commands for setting up tasks an handling them :)

 

As for server-siding functions, here are a few BIKI entries that can help you:

https://community.bistudio.com/wiki/Locality_in_Multiplayer

https://community.bistudio.com/wiki/isServer

https://community.bistudio.com/wiki/isDedicated

https://community.bistudio.com/wiki/hasInterface

 

And the following little overview:

if (isDedicated) then {
	//run on dedicated server only
};

if (isServer) then {
	//run on dedicated server or player host
};

if (hasInterface) then {
	//run on all player clients incl. player host
};

if (!isDedicated) then {
	//run on all player clients incl. player host and headless clients
};

if (!isServer) then {
	//run on all player clients incl. headless clients but not player host
};

if (!hasInterface) then {
	//run on headless clients and dedicated server
};

if (!hasInterface && !isDedicated) then {
	//run on headless clients only
};

 

Link to comment
Share on other sites

On 2017/7/16 at 2:03 AM, Mokka said:

Hope this is not too late for you, but have a look at the BIKI entry on the Arma 3 Task Framework:

https://community.bistudio.com/wiki/Arma_3_Task_Framework

 

The article contains almost everything you need in regards to relevant functions and commands for setting up tasks an handling them :)

 

As for server-siding functions, here are a few BIKI entries that can help you:

https://community.bistudio.com/wiki/Locality_in_Multiplayer

https://community.bistudio.com/wiki/isServer

https://community.bistudio.com/wiki/isDedicated

https://community.bistudio.com/wiki/hasInterface

 

And the following little overview:


if (isDedicated) then {
	//run on dedicated server only
};

if (isServer) then {
	//run on dedicated server or player host
};

if (hasInterface) then {
	//run on all player clients incl. player host
};

if (!isDedicated) then {
	//run on all player clients incl. player host and headless clients
};

if (!isServer) then {
	//run on all player clients incl. headless clients but not player host
};

if (!hasInterface) then {
	//run on headless clients and dedicated server
};

if (!hasInterface && !isDedicated) then {
	//run on headless clients only
};

 

Thank you very much indeed. Because I see many servers that simply load the basic files of the task. Complex script files appear to be loaded on the server side. It makes me feel very smooth in the game and not very low in FPS

Link to comment
Share on other sites

You could go a step further, depending on the complexity of your project, and completely separate scripting components between server and client.

This would basically mean putting all relevant files that are meant for the server only into an addon, which only the server loads in on startup.

The mission file (i.e. the missionName.Altis) folder would then only contain scripts that are running on the client.

 

If you want to go down that path, just let me know. I'll guide you through the setup if you wish :)

Link to comment
Share on other sites

20 hours ago, Mokka said:

You could go a step further, depending on the complexity of your project, and completely separate scripting components between server and client.

This would basically mean putting all relevant files that are meant for the server only into an addon, which only the server loads in on startup.

The mission file (i.e. the missionName.Altis) folder would then only contain scripts that are running on the client.

 

If you want to go down that path, just let me know. I'll guide you through the setup if you wish :)

I'm very anxious for help. Thank you very much. But My English is not very good. I'm sorry……

Link to comment
Share on other sites

20 hours ago, Mokka said:

You could go a step further, depending on the complexity of your project, and completely separate scripting components between server and client.

This would basically mean putting all relevant files that are meant for the server only into an addon, which only the server loads in on startup.

The mission file (i.e. the missionName.Altis) folder would then only contain scripts that are running on the client.

 

If you want to go down that path, just let me know. I'll guide you through the setup if you wish :)

I hope you can help me. Thank you very much

Link to comment
Share on other sites

On 2017/7/19 at 9:39 PM, Mokka said:

You could go a step further, depending on the complexity of your project, and completely separate scripting components between server and client.

This would basically mean putting all relevant files that are meant for the server only into an addon, which only the server loads in on startup.

The mission file (i.e. the missionName.Altis) folder would then only contain scripts that are running on the client.

 

If you want to go down that path, just let me know. I'll guide you through the setup if you wish :)

I need you, friend.

Link to comment
Share on other sites

6 hours ago, Mokka said:

;_; I have returned :)

 

I will send you something to help you tomorrow, once I have some more sleep in my system :D

So what do I need to do first? I need to start with the most basic questions.
May I add your steam number?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Forum Statistics

    11.1k
    Total Topics
    66.4k
    Total Posts
×
×
  • Create New...