Jump to content

Recommended Posts

Hi there!

im having some locality issues when using headless clients, i tryed with 

if (hasInterface) exitwith {}

so it only should be executed on HC or Server. 

i made an script were if 4/9 units from a group are killed they run away... but using a script from werthless, i saw the locality changes to the server when a unit dies, and in the next cycle, it goes again to the Headless, so units stop moving.

any ideas how to have less problems with hc? 

 

Thankyou!

Share this post


Link to post
Share on other sites

I guess you have to deliver more information then. maybe some code...

Share this post


Link to post
Share on other sites
1 hour ago, sarogahtyp said:

I guess you have to deliver more information then. maybe some code...

im using this script :

 

  if (hasInterface) exitwith {};


  _grp = _this select 0;
  _son = count (units _grp);
  if (_son < 4) exitWith {};

  _r = (round (_son/2));

  while { true } do {
    _quedan = {alive _x}count (units _grp);
    if (_quedan <= _r) then {
        {
        sleep 10;
        [_x] join grpNull;
        sleep 0.1;
        //(group _x) setgroupowner 2;
        //waituntil { groupowner (group _x) == 2};
        _x enableai "PATH";
        _x setunitpos "AUTO";
        _x setBehaviour "CARELESS";
        _x disableai "AUTOCOMBAT";
        _x disableai "AUTOTARGET";
        _x disableai "WEAPONAIM";
        _x setspeedmode "FULL";
        _retipos = [4423.02,5976.91,-0.000244141];
        _x domove _retipos;

        }foreach (units _grp);
        if (_quedan <= _r) exitwith {}
      };
    if (_quedan <= _r) exitwith {};
    sleep 1;
  };

Share this post


Link to post
Share on other sites
22 minutes ago, FlyingTarta said:

[_x] join grpNull;

not sure but i guess this could shift locality to server because you kick the unit out of the group and it joins its own group automatically which maybe is owned by server.

you could try to create a group where the origin group is local and let the unit join that group.

but as i said I'm not sure

Share this post


Link to post
Share on other sites
37 minutes ago, sarogahtyp said:

not sure but i guess this could shift locality to server because you kick the unit out of the group and it joins its own group automatically which maybe is owned by server.

you could try to create a group where the origin group is local and let the unit join that group.

but as i said I'm not sure

yup, was that, when they join to a new group, the locality changes, taking out that is solved... i need to change the script, but with that in mind will be much easyier... 

thank you!! 

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

×