Jump to content
Sign in to follow this  
davidoss

prevent moving group to the headless

Recommended Posts

Hi fellows.

I have just two question.

 

Is there any possibility to prevent moving group to the headless client?

Or maybe any possibility to switch  ownership of  group back to the  server if owner of group is HC?

 

This is going about ALiVE combat support. CAS or Artilllery are not firing if the group are owned by HC.

This will be fixed with next update but i tough maybe is there any hot fix possibility  for now.

Share this post


Link to post
Share on other sites

Attempt to switch  ownership of  group back to the  server if owner of group is HC.

 

I have just get the arty locality using

_clientID = groupOwner _someGroup;

and the number is "3".

I assume i should mess with that

["function" or{code}, delayinsec, [parameters passed to the function]] call CBA_fnc_addPerFrameHandler;

and that

_localityChanged = _someGroup setGroupOwner (owner _playerObject);

But should that be executed on HC client or server?
And which locality is the server? "0" ?

Share this post


Link to post
Share on other sites

There is an event handler Local that triggers when the locality of the object changes. The BIKI states that the EH only triggers on the old owner and new owner's computers, even if added to every system. Input parameters to the EH are the object and a boolean value of if the object is local (true for new owner, false for old owner).

Share this post


Link to post
Share on other sites

Nice catch, but i have no idea how to go with this around.

Share this post


Link to post
Share on other sites

Untested, but could look something like:

MB6_fnc_revertOwnerServer = {
    _obj = param [0,objNull,[objNull]];
    _serverObj = GL_SERVER;

   _obj setOwner (owner _serverObj);
};
myUnit addEventHandler["Local",{
    if !(_this select 1) then {[_this select 0] call MB6_fnc_revertOwnerServer;};
}];

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  

×