Keeping groups local to the server

  1. 8 years ago

    We use a lot of extra units and vehicles in our ALiVE missions, and have a wish to keep them local on the server (for script and thread locality reasons), and when using HC's, this gets a little challenging.

    For example:

    Hostage rescue, if the hostage group gets transferred to a HC, the unit isnt local to the server anymore and that needs to be taken into account when writing all the loops and spawn code for that unit.

    Base defanse, AA units whit scripts that refill ammo on fire. If locality changes, setVehicleAmmo needs to be executed on the HC.

    Little things like that. My question is, is this an issue for anyone else in the community, and if so, can we get a group variable check in the HC code so it skipps transferring those groups you want to keep local to the server ?

    _grp setVariable ["ALiVE_AI_Distributor_serverLocal", true];

    and then a check for it in fnc_AI_Distributor.sqf#L46

    !(_x getVariable ["ALiVE_AI_Distributor_serverLocal", false])

    If no one never had any issues with anything like this, its no point in adding this feature. Most of the examples above can be worked around with some blackmagic, just takes a little extra effort.

  2. setVariable ["ALiVE_combatSupport", true]

    Should work

  3. I saw that in the code, but thought it might have other consequences. But doing a search for it ("ALiVE_combatSupport") in the repo, looks like it shouldnt affect anything else. I'll give it a go and report back.

  4. Friznit

    25 Sep 2016 Administrator

    It won't do anything unless the vehicle is synced to the Combat Support module, so it's a safe workaround.

  5. Edited 8 years ago by Whigital

    It does not work setting ["ALiVE_CombatSupport", true] on the group, and looking at the if statement in fnc_AI_Distributor.sqf#L46, it checks if the vehicle of the group members are in has the variable set.

    This workaround will work if you set the variable on the vehicle the unit is in. It will, from what i can see, not work on induvidual units not in a vehicle.

    And adding the variable to the vehicle spawns a group of crewmen besides the vehicle.

  6. Edited 8 years ago by Whigital

    @Whigital And adding the variable to the vehicle spawns a group of crewmen besides the vehicle.

    Having the empty AA vehicles in the mission seems to have that effect, but spawning them in via a script later does not. Im guessing having the variable on the vehicle makes the CS module do some stuff during initialization.

    Only tested on a small TestBench mission, but will try on our full ALiVE theatre.

 

or Sign Up to reply!