Jump to content
Sign in to follow this  
1para{god-father}

Headless client Setup

Recommended Posts

setowner command will offload the calculations to the headless client but if you have waypoints for that unit it won't transfer. You basically have to make script of what you want. Let's say you want to have some enemies patrolling and you want the calculations off loaded to the headless client. Just use the 3D editor to make the mission and make the headless client run it. Just a note for using the 3D editor, init line codes can't be run for some reason. The code looks correct but I've never seen it actually work outside the 3D editor.

//---run this in the init.sqf---///
if(local headLessClient) then 
{
  _null = execVM "myScript.sqf";
};

Share this post


Link to post
Share on other sites

Hmmm so instead of ruining the scripts on the server i.e.

if (isserver) then { _null = execVM "myScript.sqf"}

you just run them on the HC ?

Also what about during the mission AI spawn ?

Share this post


Link to post
Share on other sites
Hmmm so instead of ruining the scripts on the server i.e.
if (isserver) then { _null = execVM "myScript.sqf"}

you just run them on the HC ?

Also what about during the mission AI spawn ?

It will work since the local command will only let the script run on the headless client no matter when you run the command.

Share this post


Link to post
Share on other sites

One of the current problems with the headless client is that it is not correctly reporting as a player, so getting the ID of the headless client is a problem (you can't do it). If you want to run simplistic code for the headless client to spawn AI, it's not really a problem. Anything complex or dynamic would basically require the headless client to run the entire mission, however, without being able to direct network traffic directly to the headless client, it sort of defeats the purpose. It's also not scale-able, you can't run two headless clients because you can't identify which is which and have one execute some code and the other execute the rest. The headless client is partially working, but it's not very practical at the moment.

Share this post


Link to post
Share on other sites
One of the current problems with the headless client is that it is not correctly reporting as a player, so getting the ID of the headless client is a problem (you can't do it).

...

It's also not scale-able, you can't run two headless clients because you can't identify which is which and have one execute some code and the other execute the rest. The headless client is partially working, but it's not very practical at the moment.

Have you seen this: http://forums.bistudio.com/showthread.php?174402-concept-function-to-inform-Server-about-HC

Think that should cover the problem with not correctly reporting HC. With a bit of editing, it works for more than one HC to.

greetings Na_Palm

Share this post


Link to post
Share on other sites
One of the current problems with the headless client is that it is not correctly reporting as a player, so getting the ID of the headless client is a problem (you can't do it). If you want to run simplistic code for the headless client to spawn AI, it's not really a problem. Anything complex or dynamic would basically require the headless client to run the entire mission, however, without being able to direct network traffic directly to the headless client, it sort of defeats the purpose. It's also not scale-able, you can't run two headless clients because you can't identify which is which and have one execute some code and the other execute the rest. The headless client is partially working, but it's not very practical at the moment.
If the headless client is treated like a player and it occupies a slot. Name the slot HC and use BIS_fnc_MP to execute scripts with the target being HC.

Share this post


Link to post
Share on other sites
If the headless client is treated like a player and it occupies a slot. Name the slot HC and use BIS_fnc_MP to execute scripts with the target being HC.

The slot always has been named HC and the Headless Client immediately assumes the slot position upon connection. The Headless client executes code assigned to it, however, I have not been able to get it to report itself to the server via anything simple like HC_PLAYER = player; PublicVariableServer "HC_PLAYER";

I'll look at BIS_fnc_MP and see if that will resolve the problem as Na_Palm has suggested.

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  

×