Jump to content
Sign in to follow this  
fett_li

Making placed units be editable for every Zeus

Recommended Posts

Hi community,
me and my clan had the problem that when we played a zeus mission with 30 or more players and 2 or 3 zeus, every unit placed by zeus was only editable for the zeus who placed them. Also were JIPed players not marked as editable for the zeus which led to the bad situation were we couldn't order AI units to "destroy" players.

I solved both problems and I'd like to share this, because someone might be interested in it.

Make players marked as editable also with JIP:
To get this, you jast hav to add this in the initPlayerServer.sqf:

{
     _x addCuratorEditableObjects [[_this select 0],true];
} forEach allCurators;

Share Zeus placed units and groups:

If you want to have all ai shared between the zeus players, you have to include the folder you can download into your mission folder and add this to your description.ext:

class CfgFunctions {
      #include "FETT_ZeusShare\CfgFunctions.hpp"
};

Download:

https://dl.dropboxusercontent.com/u/63428639/FETT_ZeusShare.zip

 

And you're done! I hope this helps some people!

Edited by fett_li
  • Like 4

Share this post


Link to post
Share on other sites

Thanks a lot, Fett Li!

Does this also make AI units and vehicles editable/manageable, which I placed in the 2D mission editor before starting the Zeus mission?

I'm having the trouble that I (as Zeus) can't do anything with them. Or am I missing something important?

Edit:

Or can I only ADD new stuff as Zeus, but not control existing things?

Edit 2:

I found out how to do it, nevermind and sorry for hijacking your thread. :)

Under the Zeus modules place the module Add object control (I think this was the name) and sync it with the Game Master (eye) module, then sync every object/unit/vehicle or group to the object control module. This way you can control 2D-editor placed things.

Edited by Undeceived

Share this post


Link to post
Share on other sites

Please help, trial and error is not working to do this part!

I need to merge your description.ext with pre-existing script, ie vas/vvs and taw's view distance, not being that great with scripting, i cannot merge them, this is wrong i know this...

class CfgFunctions {
class FETT {
	class curator {
		class eventHandlers {postInit = 1;};
		class objPlaced {};
		class grpPlaced {};
	};
{
#include "VVS\Functions.h"
#include "VAS\cfgfunctions.hpp"
#include "taw_vd\CfgFunctions.hpp"
};

Share this post


Link to post
Share on other sites
-snip-

class CfgFunctions {
#include "VVS\Functions.h"
#include "VAS\cfgfunctions.hpp"
#include "taw_vd\CfgFunctions.hpp"
class FETT {
	class curator {
		class eventHandlers {postInit = 1;};
		class objPlaced {};
		class grpPlaced {};
	};
};
};
class 

That should work

Share this post


Link to post
Share on other sites

Thank you for this!

Quick question though, want would it take to make it so Another Zeus can see, but not edit an opposing Zeus' units?

For example, ZVZ map, I want it so one Zeus gets a marker show up when his troops are near to an enemy.

So if they have line of sight on enemy troops, it would also pop up on Zeus as markers?

Unsure if this is possible or not, but any advise would be warmly welcomed!

Share this post


Link to post
Share on other sites

I think you'd have to look up which variable makes players uneditable via zeus. When I have time the next days I'll look it up in the .pbo's, but you can do this, too :)

Share this post


Link to post
Share on other sites

Holy shit, you are my lord and savior. Thank you, thank you, thank you.

I've up until now been banging my head against the wall trying to figure out why my scripting attempt to get this same result refused to work, and I was getting afraid of my skull cracking soon.

...I'm still very curious as to why my script wasn't working though:

zeus1Module addEventHandler ["CuratorObjectPlaced", 
{
zeus2Module addCuratorEditableObjects [[(_this select 1)],true]
}];
zeus2Module addEventHandler ["CuratorObjectPlaced", 
{
zeus1Module addCuratorEditableObjects [[(_this select 1)],true]
}];

As far as my knowledge goes (Not too far), this should have worked in theory.

Share this post


Link to post
Share on other sites

This is a problem of locality. As you can see, in my eventhandlers I called first BIS_fnc_MP an within that my own function. EventHandlers are only executed local on the client where they've been fired. As exmaple, the command hint is not executed global, meaning that using hint in this event handlers would just pop up a hint box in the interface of zeus who triggered the event handler.

addCuratorEditableObjects also seems not to be global, allthough I'd would make sense if it did ;)

If you use BIS_fnc_MP or CBA_fnc_globalExecute the code is executed global and therefore... works :)

Share this post


Link to post
Share on other sites

Hey guys,

this is my description, it doesn't seem to work, what am i doing wrong here?

I did put in those three scripts in the right folders

Hope there are people who can help me out. thanks in advance

onLoadIntroTime=false;
onLoadMissionTime=false;
disabledAI=1;
debriefing=1;
respawn = 3;
showGPS=1;
respawndelay = 10;
joinUnassigned = 0;
enableDebugConsole = 1;
allowFunctionsLog = 1;
loadScreen = "DTT.jpg";
author = Marc;
onLoadName = AMO;
onLoadMission = www.Dutchtacticalteam.nl;


class Header
{
gameType = COOP;
minPlayers = 1;
maxPlayers = 50;
};

#include "gvs\colors_include.hpp"
#include "gvs\control_include.hpp"
#include "gvs\stc_include.hpp"
#include "VAS\menu.hpp"

class CfgFunctions {
class FETT {
	class curator {
		class eventHandlers {postInit = 1;};
		class objPlaced {};
		class grpPlaced {};
	};
};	
{
#include "VAS\cfgfunctions.hpp"
#include "ais_injury\cfgFunctionsAIS.hpp"
};

#include "ATM_airdrop\dialog.hpp"
#include "ais_injury\dialogs\rscTitlesAIS.hpp"


class CfgSounds
{
  sounds[] = {Vent,Vent2,Para};

class Vent {name="Vent";sound[]={ATM_airdrop\data\Vent.ogg,db-11,1.0};titles[] = {};};
class Vent2 {name="Vent2";sound[]={ATM_airdrop\data\Vent2.ogg,db-11,1.0};titles[] = {};};
class Para {name="Para";sound[]={ATM_airdrop\data\parachute.ogg,db-11,1.0};titles[] = {};};

};



And JIP doesn't work for me either. I never used a initPlayerServer.sqf, Just the init of the mission and the init of the player (in the editor) not sure where I Put that. is there a mission file I could download and test.

Once again thanks in advance.

Marc

Edited by Amiscus

Share this post


Link to post
Share on other sites

The problem is this part of your code:

class CfgFunctions {
class FETT {
	class curator {
		class eventHandlers {postInit = 1;};
		class objPlaced {};
		class grpPlaced {};
	};
};	
{
#include "VAS\cfgfunctions.hpp"
#include "ais_injury\cfgFunctionsAIS.hpp"
};

There are more brackets open then closed.

The correct code would be:

class CfgFunctions {
class FETT {
	class curator {
		class eventHandlers {postInit = 1;};
		class objPlaced {};
		class grpPlaced {};
	};
};
#include "VAS\cfgfunctions.hpp"
#include "ais_injury\cfgFunctionsAIS.hpp"
};

Maybe you see the error now when you compare both options :)

To you're other question:

The initPlayerLocal.sqf is a new event script introduced in ArmA 3. You can create it just like the init.sqf.

It is run only when a player joins the server or when the mission is started first (but then of course this script is executed for every player). It is special because the code will be executed local on every clients machine.

You can get get further information here:

https://community.bistudio.com/wiki/Event_Scripts

Share this post


Link to post
Share on other sites

Thanks for you help!!!!

The JiP works like a charm with an error, so when a player logs in I do not see him but then I get an error and I see him. so that is good enough.

The other scripts however don't seem to work. I can not see the other Zeus's placed units as editable. I did copy those three scripts in the folder C:\Users\Username\Documents\Arma 3 - Other Profiles\Name\missions\DTT_Amo_Kamp_Ekali_Zeus.Altis\functions\curator -> not sure if i need to edit something in the editor as well. I use the Zeus models that are linked to players so not with a virtual entity. Not sure if it matters but I can use 6 Zeus's at a time in this mission.

Share this post


Link to post
Share on other sites

Do you use this scripts on a local hosted multiplayer game?

Share this post


Link to post
Share on other sites

as a test yes, but in the end it will be a dedicated server

Share this post


Link to post
Share on other sites

I think, this functions don't work on local hosted games :) Test it again on dedicated :)

Share this post


Link to post
Share on other sites

I did test it on a dedicated server and it still is not working. if you want I could upload my mission I am using three mods. Marsof, superflash and cba. If you want (I would like that :P) let me know and I will toss you a download link...

Thanks a million

Marc

Share this post


Link to post
Share on other sites

First, thank you. Googled for quite some time before coming across your thread. Used the script as instructed, and it opened up the units so Zeus's can edit each other's stuff. There seem to be a few quirks, though.

Biggest one is vehicle movement. If Zeus 1 places a vehicle, and Zeus 2 rotates it, sometimes the vehicle snaps back to it's original position. Sometimes it just moves somewhere nearby, and may rotate another unit with it. Has anyone that's tried this seen similar behavior?

Second one that I've seen intermittently is if Zeus 1 places a group of infantry, and Zeus 2 tries to access them, it will strip the gear from all but one of the infantry.

Share this post


Link to post
Share on other sites

I didn't experience any of this behaviour.

But I will test it as soon as I can and bear it in mind. Thanks for the hint.

Share this post


Link to post
Share on other sites

Hi Fett, i have the same issues as what Amiscus had, i have tested on local, and also on dedicated, everytime i join(or anyone else) we get the error message saying

"Script functions\curator\fn_eventhandlers.sqf not found"

this is the first part of the description.ext:

#include "VAS\menu.hpp"
#include "DOM_squad\SquadManagement.hpp"
#include "taw_vd\dialog.hpp"

class CfgFunctions {
#include "VAS\cfgfunctions.hpp"
#include "taw_vd\CfgFunctions.hpp"
class FETT {
	class curator {
		class eventHandlers {postInit = 1;};
		class objPlaced {};
		class grpPlaced {};
	};
};
};

i can message you the mission if you need it

Share this post


Link to post
Share on other sites

For everybody else: I just answered cpt_keys' private message :)

Share this post


Link to post
Share on other sites
For everybody else: I just answered cpt_keys' private message :)

And what did he do wrong cause now I get the errors as well an not able to start on a dedicated server, I can start it on a local hosted server...

Share this post


Link to post
Share on other sites
And what did he do wrong cause now I get the errors as well an not able to start on a dedicated server, I can start it on a local hosted server...

basically you just need to put it in the folders it says, so in your mission, make the folder "functions" then inside that make a folder called "curator", then in there put the files.

so it should look like

functions\curator\filenamehere.sqf

Share this post


Link to post
Share on other sites

There is an eventhandler for marker placement by curator. But as far as I'm concerned, there is noch such scripting command like curatorAddEditableMarker. So there seems no way to achieve that. Allthough I could imagine that it is possible with some modding.

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  

×