Jump to content

Recommended Posts

Just edit the adv_zeus.sqf:

 

Comment the lines you don't want to have, like line #13 and #15 and lines #19 to #22:

_curator addCuratorEditableObjects [vehicles,true];
//_curator addCuratorEditableObjects [(allMissionObjects "Man"),false];
_curator addCuratorEditableObjects [(allMissionObjects "Air"),true];
//_curator addCuratorEditableObjects [(allMissionObjects "Ammo"),false];

//makes all units continuously available to Zeus (for respawning players and AI that's being spawned by a script.)
while {true} do {
/*
    _toAdd = if (!_addCivilians && {(side _x) == civilian}) then {false} else {true};
    {
        if (_toAdd) then {_curator addCuratorEditableObjects [[_x], true]};
    } forEach allUnits;
*/
    _curator addCuratorEditableObjects [vehicles, true];
    sleep 10;
};

The only things that are being added on the beginning of the mission are editor placed vehicles (both land and air), units and ammo-crates. In progress only vehicles are being added to curator now.

Share this post


Link to post
Share on other sites

Just edit the adv_zeus.sqf:

 

Comment the lines you don't want to have, like line #13 and #15 and lines #19 to #22:

_curator addCuratorEditableObjects [vehicles,true];
//_curator addCuratorEditableObjects [(allMissionObjects "Man"),false];
_curator addCuratorEditableObjects [(allMissionObjects "Air"),true];
//_curator addCuratorEditableObjects [(allMissionObjects "Ammo"),false];

//makes all units continuously available to Zeus (for respawning players and AI that's being spawned by a script.)
while {true} do {
*/
    _toAdd = if (!_addCivilians && {(side _x) == civilian}) then {false} else {true};
    {
        if (_toAdd) then {_curator addCuratorEditableObjects [[_x], true]};
    } forEach allUnits;
*/
    _curator addCuratorEditableObjects [vehicles, true];
    sleep 10;
};

The only things that are being added on the beginning of the mission are editor placed vehicles (both land and air), units and ammo-crates. In progress only vehicles are being added to curator now.

Thank you for the response, but the script tries to read through the comments " */ " which just makes the script stop working altogether. So I tried just erasing everything underneath the comments, and it still added all structural object to the curator. Maybe I am not entirely sure how comment lines work? Or I am just misunderstanding. See only land and air vehicles should be added to the curator and absolutely nothing else, not even at the beginning. Not even players because the Game Master Module, I believe, now automatically adds ALL playable units to be edited. 

Share this post


Link to post
Share on other sites

Thank you for the response, but the script tries to read through the comments " */ " which just makes the script stop working altogether. So I tried just erasing everything underneath the comments, and it still added all structural object to the curator. Maybe I am not entirely sure how comment lines work? Or I am just misunderstanding. See only land and air vehicles should be added to the curator and absolutely nothing else, not even at the beginning. Not even players because the Game Master Module, I believe, now automatically adds ALL playable units to be edited. 

 

Yes. Because I'm an idiot. The first comment has to be a /* of course. Fixed it in the post above.

The module doesn't add the players though. Comment the lines you don't want.

Share this post


Link to post
Share on other sites

Yes. Because I'm an idiot. The first comment has to be a /* of course. Fixed it in the post above.

The module doesn't add the players though. Comment the lines you don't want.

Thank you very much for your support!  

  • Like 1

Share this post


Link to post
Share on other sites

I am trying to get this script to only make blufor units useable by the zues, i tried adding "if (side Man == west) then" but it just returns an error.

Im afraid i am a total noob when it comes to scripting so any help would be much apreciated

Share this post


Link to post
Share on other sites

First off: Copy over this version, which is the only current one. I haven't uploaded anything to armaholic in quite some while, so the armaholic download is not up to date at all. https://github.com/Pergor/ADV_MissionTemplate/blob/master/adv_missiontemplate.altis/functions/server/fn_zeusObjects.sqf

 

Then you should take a look at lines 48 and 49. Comment those lines and place these lines after the commented lines:

_bluforUnits = [];

_bluforUnits = { if ( side (group _x) == west ) then { _bluforUnits pushBack _x } } count allUnits;

_x addCuratorEditableUnits [_bluforUnits,true];

 

That should probably do the trick.

Share this post


Link to post
Share on other sites

unfortunatly it returns an error, "missing :"

 

this is what i did:

 

while {true} do {
            {
                _curatorUnit = getAssignedCuratorUnit _x;
                if (!isNil "_curatorUnit") then {
                    //_x addCuratorEditableObjects [allUnits, false];
                    //_x addCuratorEditableObjects [vehicles, true];
                    _bluforUnits = [];
                    _bluforUnits = { if ( side (group _x) == west ) then { _bluforUnits pushBack _x } } count allUnits;
                    _x addCuratorEditableUnits [_bluforUnits,true];
                };
            } count allCurators;
            sleep 5;
        };
    };

Share this post


Link to post
Share on other sites

Ah, yes. The last }; is wrong. And I used a non existant command. It should be addCuratorEditableObjects of course:

while {true} do {
	{
		_curatorUnit = getAssignedCuratorUnit _x;
		if (!isNil "_curatorUnit") then {
			//_x addCuratorEditableObjects [allUnits, false];
			//_x addCuratorEditableObjects [vehicles, true];
			_bluforUnits = [];
			_bluforUnits = { if ( side (group _x) == west ) then { _bluforUnits pushBack _x } } count allUnits;
			_x addCuratorEditableObjects [_bluforUnits,true];
		};
	} count allCurators;
	sleep 5;
};

Share this post


Link to post
Share on other sites

after some playtesting with a buddy the units that respawn are not accesable by the zues player, no error messages tho.

 

edit:

and after recopying the script it works again, must have messed up a line or something,

 

anyway...

thanks again :P

 

second edit:

 

and we are back to start.... after a while opfor spawns in and they show up on zues :(

Share this post


Link to post
Share on other sites

You ought to start with -showscripterrors. That way you should have found the error pretty much on your own. ;)

		while {true} do {
			{
				if ( !isNull (getAssignedCuratorUnit _x) ) then {
					_bluforUnits = [];
					{ if ( side (group _x) == west ) then { _bluforUnits pushBack _x }; nil; } count allUnits;
					_x addCuratorEditableObjects [_bluforUnits,true];
				};
			} count allCurators;
			sleep 5;
		};

I tested it now and it works. Or at least for me it does. If opfor units still show up for you, you've got some kind of third system to addCuratorEditableObjects in place (like ace_zeus for example).

  • Like 1

Share this post


Link to post
Share on other sites

still no succes for me :(,

i do have a billion scripts stuck togheter for the mission i am making so probably something to do with those.

 

i wanna thank you so much for your help and i will give a shout when i find out what is interfering.

 

cheers!

  • Like 1

Share this post


Link to post
Share on other sites

Good luck then! :)

  • Like 1

Share this post


Link to post
Share on other sites

Hello, thanks for this handy script.

 

I'm facing a problem. I'm trying to make it work so only 1 Zeus can be able to be able to see script spawned units etc.

 

On the init.sqf file i'm writing the name of that 1 Zeus but the 2nd Zeus gets to see and edit units too.

if (isServer) then {
   [zeus1,true] execVM "ADV_zeus.sqf";
};

Is anything i'm doing wrong?

Share this post


Link to post
Share on other sites

You have to enter the name of the curatormodule and not the name of the zeus unit.

Share this post


Link to post
Share on other sites

You have to enter the name of the curatormodule and not the name of the zeus unit.

Alright placing down a Zeus module on the System: Init -> Variable Name: zeus1

Isn't that the name of the Curatormodule?

 

That's how i have it right now.

Share this post


Link to post
Share on other sites

Are you using ace or mcc by any chance?

Share this post


Link to post
Share on other sites

There's got to be another system that's adding these units to your other curator.

Share this post


Link to post
Share on other sites

Hmm you're probably right. 

 

I'm trying to get it to work with Liberation mission and i found out a file named "zeus_synchro.sqf"

Code of the file:
 

waitUntil { !isNil "huron_typename" };

_vehicleClassnames = [huron_typename];


{
	_vehicleClassnames = _vehicleClassnames + [_x select 0];
} foreach (light_vehicles + heavy_vehicles + air_vehicles + static_vehicles + support_vehicles) ;

while { true } do {

	waitUntil { sleep 0.3; count allCurators > 0 };

	_zeusunits = [];
	{
		if ( (side group _x == GRLIB_side_friendly ) && ( _x distance lhd > 1000 ) && alive _x ) then {
			_zeusunits pushback _x;
		};
	} foreach allUnits;

	{
		if ((typeof _x in _vehicleClassnames ) && (typeof _x != ammobox_o_typename) && (( _x distance lhd > 1000 ) || (typeof _x == huron_typename)) && alive _x ) then {
			_zeusunits pushback _x;
		};
	} foreach vehicles;

	_zeusunits = _zeusunits + switchableUnits;
	_zeusunits = _zeusunits + playableUnits;
	_zeusunits = _zeusunits - (curatorEditableObjects (allCurators select 0));

	_units_to_remove = [];
	{
		if ( !(alive _x) ) then {
			_units_to_remove pushback _x;
		};
	} foreach (curatorEditableObjects (allCurators select 0));

	{
		_zgm = _x;
		_zgm addCuratorEditableObjects [_zeusunits,true];
		_zgm removeCuratorEditableObjects [_units_to_remove,true];

		/*_zgm  setCuratorCoef ["edit", -1e8];
		_zgm  setCuratorCoef ["place", -1e8];
		_zgm  setCuratorCoef ["synchronize", 0];
		_zgm  setCuratorCoef ["delete", 0];
		_zgm  setCuratorCoef ["destroy", -1e8];
		*/

	} foreach allCurators;

	sleep 10;
};

Do you think that's it?

Share this post


Link to post
Share on other sites

Yes, that's it. Especially:

_zgm addCuratorEditableObjects [_zeusunits,true];

Share this post


Link to post
Share on other sites

Hello once more,

 

Is it possible to restrict adding the weapons of the dead bodies into Zeus?

 

So let's say i would like to have only the units,vehicles.

 

P.S I managed to solve the problem i had with the "zeus_synchro.sqf", thanks :)

Share this post


Link to post
Share on other sites

You mean the groundweaponholders that are being generated if a unit dies?

Share this post


Link to post
Share on other sites

Yes when a units dies, their weapon is added as an Object to Zeus.

 

Is there a way to avoid adding them?

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

×