Jump to content

Recommended Posts

Hi all,

 

I have created a short piece of code that makes the Curator Editing Area follow the Curator player around the map.

Spoiler

[] spawn {

    while { alive BLUFOR_Player001 } do {

        if ( { _x distance2D BLUFOR_Player001 < 40 && side _x == independent } count allUnits != 0 ) then {

            ZeusBLUFOR001_Curator removeCuratorEditingArea 1;

                } else {

                    ZeusBLUFOR001_Curator addCuratorEditingArea [ 1, position BLUFOR_Player001, 40 ];

                    sleep 0.05;

                };

        };

};

I have four potential Curator players (BLUFOR_Player001 to BLUFOR_Player004) who all have the exact same code linked to them except for their names and Curator Editing Area code.

 

Each of the four BLUFOR Curator players are not created on map initialisation. Instead, I wanted the player unit to be created when a player decides to play that role. I initially had my script in the init.sqf, however, when testing, I would get errors saying that the other BLUFOR Curators did not exist (because I was only playing as BLUFOR_Player001).

 

What I am wondering is how/where do I place my script so that it is added to every new BLUFOR player when they join the game (It must be unique to them, see below).

Spoiler

[] spawn {

    while { alive BLUFOR_Player001 } do {

        if ( { _x distance2D BLUFOR_Player001 < 40 && side _x == independent } count allUnits != 0 ) then {

            ZeusBLUFOR001_Curator removeCuratorEditingArea 1;

                } else {

                    ZeusBLUFOR001_Curator addCuratorEditingArea [ 1, position BLUFOR_Player001, 40 ];

                    sleep 0.05;

                };

        };

};

Spoiler

[] spawn {

    while { alive BLUFOR_Player002 } do {

        if ( { _x distance2D BLUFOR_Player002 < 40 && side _x == independent } count allUnits != 0 ) then {

            ZeusBLUFOR002_Curator removeCuratorEditingArea 2;

                } else {

                    ZeusBLUFOR002_Curator addCuratorEditingArea [ 2, position BLUFOR_Player002, 40 ];

                    sleep 0.05;

                };

        };

};

Spoiler

[] spawn {

    while { alive BLUFOR_Player003 } do {

        if ( { _x distance2D BLUFOR_Player003 < 40 && side _x == independent } count allUnits != 0 ) then {

            ZeusBLUFOR003_Curator removeCuratorEditingArea 3;

                } else {

                    ZeusBLUFOR003_Curator addCuratorEditingArea [ 3, position BLUFOR_Player003, 40 ];

                    sleep 0.05;

                };

        };

};

Spoiler

[] spawn {

    while { alive BLUFOR_Player004 } do {

        if ( { _x distance2D BLUFOR_Player004 < 40 && side _x == independent } count allUnits != 0 ) then {

            ZeusBLUFOR004_Curator removeCuratorEditingArea 4;

                } else {

                    ZeusBLUFOR004_Curator addCuratorEditingArea [ 4, position BLUFOR_Player004, 40 ];

                    sleep 0.05;

                };

        };

};

 

Share this post


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

What I am wondering is how/where do I place my script so that it is added to every new BLUFOR player when they join the game

Thats what initPlayerLocal.sqf is for.

Share this post


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

Thats what initPlayerLocal.sqf is for.

Ok, so this is my initPlayerLocal.sqf

Spoiler

//initPlayerLocal.sqf

 

[] spawn {

    while { alive BLUFOR_Player001 } do {

        if ( { _x distance2D BLUFOR_Player001 < 40 && side _x == independent } count allUnits != 0 ) then {

            ZeusBLUFOR001_Curator removeCuratorEditingArea 1;

                } else {

                    ZeusBLUFOR001_Curator addCuratorEditingArea [ 1, position BLUFOR_Player001, 40 ];

                    sleep 0.05;

                };

        };

};

 

[] spawn {

    while { alive BLUFOR_Player002 } do {

        if ( { _x distance2D BLUFOR_Player002 < 40 && side _x == independent } count allUnits != 0 ) then {

            ZeusBLUFOR002_Curator removeCuratorEditingArea 2;

                } else {

                    ZeusBLUFOR002_Curator addCuratorEditingArea [ 2, position BLUFOR_Player002, 40 ];

                    sleep 0.05;

                };

        };

};

 

[] spawn {

    while { alive BLUFOR_Player003 } do {

        if ( { _x distance2D BLUFOR_Player003 < 40 && side _x == independent } count allUnits != 0 ) then {

            ZeusBLUFOR003_Curator removeCuratorEditingArea 3;

                } else {

                    ZeusBLUFOR003_Curator addCuratorEditingArea [ 3, position BLUFOR_Player003, 40 ];

                    sleep 0.05;

                };

        };

};

 

[] spawn {

    while { alive BLUFOR_Player004 } do {

        if ( { _x distance2D BLUFOR_Player004 < 40 && side _x == independent } count allUnits != 0 ) then {

            ZeusBLUFOR004_Curator removeCuratorEditingArea 4;

                } else {

                    ZeusBLUFOR004_Curator addCuratorEditingArea [ 4, position BLUFOR_Player004, 40 ];

                    sleep 0.05;

                };

        };

};

I am still getting the same error regarding the other players who haven't joined the game yet.

 

I am still not sure how to use this

Share this post


Link to post
Share on other sites
5 hours ago, rkemsley said:

Each of the four BLUFOR Curator players are not created on map initialisation. Instead, I wanted the player unit to be created when a player decides to play that role. I initially had my script in the init.sqf, however, when testing, I would get errors saying that the other BLUFOR Curators did not exist (because I was only playing as BLUFOR_Player001).

 

Difficult to follow you. I wanted the player unit to be created when a player decides to play that role. What does that mean? Disabling AI in lobby? DON'T for what you are trying to do.

 

Players have to choose one of the playable units in lobby, so the role if you want.

Playable units are defined or not, along with:

- played slot: unit is defined;

- non-played slot: unit is defined as AI if <disable AI> option is not ticked in lobby,... but not defined if <disable AI> is ticked in lobby (in this case playableUnits is same as allPlayers, even more:   isNil "anyNonPlayedUnit"  returns true)

 

Example: you play BLUFOR_Player001 but your BLUFOR_Player002,   BLUFOR_Player003... are not yet played...

If they are not present (as AIs) BLUFOR_Player002 and BLUFOR_Player003 doesn't exist! isNil "BLUFOR_Player002" returns true...

but, on the other hand,

if you don't disable AI in lobby, the non-played units are AIs til you play them, so exist! You can hide them and disable simulation on them and you can run scripts with BLUFOR_Player001 ,BLUFOR_Player002, BLUFOR_Player003,.. These variables are OK.

Furthermore, the while {alive BLUFOR_Player001 } loop can exit if you respawn at start. But it seems to be a secondary problem here.

Share this post


Link to post
Share on other sites

I did not check every command of your script in biki because this is your own job but something like this should do what you want.

Put it in  onPlayerRespawn.sqf and read those event scripts description in biki.

 

private _zeus_curator = objNull;
private "_areaID";
  
switch (player) do
{
 case BLUFOR_Player001: { _zeus_curator = ZeusBLUFOR001_Curator; _areaID = 1; };
 case BLUFOR_Player002: { _zeus_curator = ZeusBLUFOR002_Curator; _areaID = 2; };
 case BLUFOR_Player003: { _zeus_curator = ZeusBLUFOR003_Curator; _areaID = 3; };
 case BLUFOR_Player004: { _zeus_curator = ZeusBLUFOR004_Curator; _areaID = 4; };
};

if (isNull _zeus_curator) exitWith {};

while { alive player } do 
{
 if ( { _x distance2D player < 40 && side _x isEqualTo independent } count allUnits > 0 ) then 
 { _zeus_curator removeCuratorEditingArea _areaID; } else 
 { _zeus_curator addCuratorEditingArea [ _areaID, (position player), 40 ]; };
 sleep 0.5;
};

 

Edited by sarogahtyp
fixed area ID
  • Like 1

Share this post


Link to post
Share on other sites

You also have it for Independent (green), but written/setup for Blufor (blue)?

Share this post


Link to post
Share on other sites
12 minutes ago, Von Quest said:

You also have it for Independent (green), but written/setup for Blufor (blue)?

No, he just checks if an independent is near and deletes the editing area if that is the case.

but there  is an ID conflict which I did not see...

 

EDIT: conflict fixed now

Share this post


Link to post
Share on other sites
15 hours ago, pierremgi said:

 

Difficult to follow you. I wanted the player unit to be created when a player decides to play that role. What does that mean? Disabling AI in lobby? DON'T for what you are trying to do.

 

Players have to choose one of the playable units in lobby, so the role if you want.

Playable units are defined or not, along with:

- played slot: unit is defined;

- non-played slot: unit is defined as AI if <disable AI> option is not ticked in lobby,... but not defined if <disable AI> is ticked in lobby (in this case playableUnits is same as allPlayers, even more:   isNil "anyNonPlayedUnit"  returns true)

 

Example: you play BLUFOR_Player001 but your BLUFOR_Player002,   BLUFOR_Player003... are not yet played...

If they are not present (as AIs) BLUFOR_Player002 and BLUFOR_Player003 doesn't exist! isNil "BLUFOR_Player002" returns true...

but, on the other hand,

if you don't disable AI in lobby, the non-played units are AIs til you play them, so exist! You can hide them and disable simulation on them and you can run scripts with BLUFOR_Player001 ,BLUFOR_Player002, BLUFOR_Player003,.. These variables are OK.

Furthermore, the while {alive BLUFOR_Player001 } loop can exit if you respawn at start. But it seems to be a secondary problem here.

Ok, I guess I need to give more context to my multiplayer map.

 

Basically, two teams (BLUFOR and Independent) are against each other. There are four player slots for BLUFOR (FIA) and one player slot for Independent (AAF) (every player has Curator access). The Independent player is permanently in Curator mode and doesn't have a character on the map and their editing zone is around their military base. The BLUFOR players can swap from Curator mode and character mode whenever they like and their editing zone follows their character around the map. The win condition for the BLUFOR team is to destroy the big military tower in Independent's base. The win condition for the Independent team is to kill all of the BLUFOR players.

 

(I am still in the process of thinking about how points should be awarded to each team, I just want to get the basics of the mission working properly, then think about the other mechanics).

 

So it's basically a Guerilla Warfare Zeus vs Zeus map.

 

 

I have the win conditions working on the map, however, if I don't spawn BLUFOR with AI playing in the player slots, I can't test my code (because the game will just end with a win). When it's actually ready to be played, I need it so that players can join/leave the BLUFOR player slots and it won't affect the script which makes their Curator Editing Zone follow them around.

 

Edit: In the editor, I am using the Curator Modules and linking them to the players. I am using the modules for both BLUFOR and Independent because for the Independent player, I want him to pick from the Independent side rather than going into the Zeus player slot which is added if you use the Curator Player Module.

 

I am currently disabling the AI as a playable role for testing, but when I am ready to test with other players, I will disable the AI for players in the Multiplayer drop down in the Eden Editor.

Edited by rkemsley
Edit for pierremgi

Share this post


Link to post
Share on other sites

Yes, but you don't describe what you are doing exactly in the editor or script:
- are you using modules (Game master, probably), logics like I_virtualCurator_F and/or playable units...  How are you creating your Zeus???

and in lobby:

- are your disabling AIs  as playable role in lobby?

 

As test, and it's my third question (thanks for answering the previous ones), write these watch lines in the console, at the game start (say first minute), and share the result for:
allCurators apply {[_x,owner_x,side _x, side owner _x]}

allPlayers apply {[_x,side _x]}
playableUnits apply {[_x,side _x]}

Share this post


Link to post
Share on other sites
2 hours ago, pierremgi said:

Yes, but you don't describe what you are doing exactly in the editor or script:
- are you using modules (Game master, probably), logics like I_virtualCurator_F and/or playable units...  How are you creating your Zeus???

and in lobby:

- are your disabling AIs  as playable role in lobby?

 

As test, and it's my third question (thanks for answering the previous ones), write these watch lines in the console, at the game start (say first minute), and share the result for:
allCurators apply {[_x,owner_x,side _x, side owner _x]}

allPlayers apply {[_x,side _x]}
playableUnits apply {[_x,side _x]}

allCurators apply {[_x,owner_x,side _x]}

[[ZeusIndependent001_Curator,any,LOGIC],[ZeusBLUFOR001_Curator,any,LOGIC],[ZeusBLUFOR002_Curator,any,LOGIC],[ZeusBLUFOR003_Curator,any,LOGIC],[ZeusBLUFOR004_Curator,any,LOGIC]]

 

(I had to change it from "allCurators apply {[_x,owner_x,side _x, side owner _x]}" because I was getting errors).

 

allPlayers apply {[_x,side _x]}
[[BLUFOR_Player001,WEST]]

playableUnits apply {[_x,side _x]}
[[BLUFOR_Player001,WEST],[BLUFOR_Player002,WEST],[BLUFOR_Player003,WEST],[BLUFOR_Player004,WEST],[Independent_Player001,GUER]]

 

Edit: I edited my earlier response to answer your earlier questions.

Share this post


Link to post
Share on other sites
11 hours ago, sarogahtyp said:

I did not check every command of your script in biki because this is your own job but something like this should do what you want.

Put it in  onPlayerRespawn.sqf and read those event scripts description in biki.

 


private _zeus_curator = objNull;
private "_areaID";
  
switch (player) do
{
 case BLUFOR_Player001: { _zeus_curator = ZeusBLUFOR001_Curator; _areaID = 1; };
 case BLUFOR_Player002: { _zeus_curator = ZeusBLUFOR002_Curator; _areaID = 2; };
 case BLUFOR_Player003: { _zeus_curator = ZeusBLUFOR003_Curator; _areaID = 3; };
 case BLUFOR_Player004: { _zeus_curator = ZeusBLUFOR004_Curator; _areaID = 4; };
};

if (isNull _zeus_curator) exitWith {};

while { alive player } do 
{
 if ( { _x distance2D player < 40 && side _x isEqualTo independent } count allUnits > 0 ) then 
 { _zeus_curator removeCuratorEditingArea _areaID; } else 
 { _zeus_curator addCuratorEditingArea [ _areaID, (position player), 40 ]; };
 sleep 0.5;
};

 

I seem to be having a problem with this (it shouldn't have anything to do with "respawnOnStart" because the default is 1 and I haven't changed it to do anything else).

 

This just doesn't seem to be working for some reason.

 

Edit: added this to a newly created onPlayerRespawn.sqf. However, the Curator Editing area does not show up in-game, I also don't receive any error message.

Spoiler

// onPlayerRespawn.sqf

 

private _zeusCurator = objNull;

private "_areaID";

  

switch ( player ) do {

    case BLUFOR_Player001: { _zeusCurator = ZeusBLUFOR001_Curator; _areaID = 1; };

    case BLUFOR_Player002: { _zeusCurator = ZeusBLUFOR002_Curator; _areaID = 2; };

    case BLUFOR_Player003: { _zeusCurator = ZeusBLUFOR003_Curator; _areaID = 3; };

    case BLUFOR_Player004: { _zeusCurator = ZeusBLUFOR004_Curator; _areaID = 4; };

    };

if ( isNull _zeusCurator ) exitWith {};

 

while { alive player } do {

    if ( { _x distance2D player < 40 && side _x == independent } count allUnits != 0 ) then {

        _zeusCurator removeCuratorEditingArea _areaID;

            } else {

                _zeusCurator addCuratorEditingArea [ _areaID, position player, 40 ];

                sleep 0.05;

        };

};

 

My description.ext just incase that could be the problem (which I don't think it is).

Spoiler

// description.ext

 

dev = "rkemsley";

author = "rkemsley";

OnLoadName = "AI_Tests";

onLoadMission = "";

overviewText = "";

overviewTextLocked = "";

overviewPicture = "";

 

class Header

{

    gameType =  ZvZ;    // Game type

    minPlayers =  2;    // minimum number of players the mission supports

    maxPlayers = 5; // maximum number of players the mission supports

};

 

Edited by rkemsley
More specific!

Share this post


Link to post
Share on other sites
1 minute ago, rkemsley said:

I seem to be having a problem with this

 

1 minute ago, rkemsley said:

This just doesn't seem to be working for some reason.

 

pls get not too specific I may not be able to handle it

  • Haha 1

Share this post


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

 

 

pls get not too specific I may not be able to handle it

I have edited the previous response to be more specific!

 

Edit: I sorted out the problem, I changed the "onPlayerRespawn.sqf" to an "initPlayerLocal.sqf" because it can also fire the script if a player joins in progress.

The moving Curator Editing Area is now working correctly. Thanks for your help!

 

Edit : Edit: So, if I have it located in a "onPlayerRespawn.sqf" nothing happens, the Curator Editing Area never shows and it seems the script doesn't exist at all.

If I have it located in an "initPlayerLocal.sqf" I get this error message:

 

" '..."_areaID";

 

switch ( player ) do {

case |#|BLUFOR_Player001: { _ZeusCurator = ZeusB...'

Error undefined variable in expression: blufor_player001

File C:\Users\"me"\bla\bla\Arma3\missions\AI_Tests.VR\initPlayerLocal.sqf..., line 7 "

 

Oddly, I don't get this message if I am playing as BLUFOR_Player001, it only appears if I player one of the other three BLUFOR players.

Edited by rkemsley
New error

Share this post


Link to post
Share on other sites

I dont know what the problem is, I can't see a mistake but you can try to add this at the very beginning of the code:

 

waitUntil {sleep 1; not isNull player };

if this is not helping then just delete the line after testing.

Share this post


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

I dont know what the problem is, I can't see a mistake but you can try to add this at the very beginning of the code:

 


waitUntil {sleep 1; not isNull player };

if this is not helping then just delete the line after testing.

Hmm, that just delays the error message.

 

Would you suggest not using the Eden Editor Curator Module and instead add the Curator to players using scripts?

 

Edit: Strangely, if I play as BLUFOR_Player001 and disable AI for all other player slots, I don't get the message. I also don't get the message if I disable AI, then add one AI player into BLUFOR_Player001 and I play as BLUFOR_Player002.

 

It only seems to show the error if I disable AI and have no one playing as the first BLUFOR player in the list...

Edited by rkemsley

Share this post


Link to post
Share on other sites

Yes, use the game master modules! Don't forget to specify the owner, but you have to do more!


Like this, that can't work for two reasons already mentioned:

1 - As you can see in your console results, the non-played units are not defined if you disable AI. Only the played one(s) is/are. So, the non-played owner(s), even if you wrote them in owner field of the module, are not defined.

2 - Owners are not still defined for another reason: even if you let the slots AI enabled (so the units are present/exist, hidden or not), BI decided to mask the owner in its function, until you play as him. To be more precise, here are the lines which ruin your attempt:
 

Spoiler

 

   FROM   BIS_fnc_moduleCurator

.....

//--- Get curator owner
  _ownerVar = _logic getvariable ["owner",""];
  _ownerUID = parsenumber _ownerVar;
.....

  if (_ownerUID > 0 && !ismultiplayer) then {
    _ownerVar = player call bis_fnc_objectvar;
  };
  _isAdmin = _ownerVar == "#adminLogged" || _ownerVar == "#adminVoted";

  //--- Wipe out the variable so clients can't access it
  _logic setvariable ["owner",nil];

.....

 

you can find the complete script via function viewer from console, and the way BI manages the owner once the player is present (owner played).

 

 

The reason why I suggested you:
- never disable AI for Zeus slots;
- write an array of couples  [curator,owner] to catch everything you need, especially side of the playable units.

 

You can also set an extra variable, just f..king BI "owner" one, like:

ZeusBLUFOR002_Curator setVariable ["myHolyOwner",BLUFOR_Player002,TRUE] ;

 

But, I do insist:   BLUFOR_Player002 MUST be present/exist/non-disabled in lobby!! (you can hide/invincible him if you wish)

 

 

 

Share this post


Link to post
Share on other sites
50 minutes ago, rkemsley said:

Edit: Strangely, if I play as BLUFOR_Player001 and disable AI for all other player slots, I don't get the message. I also don't get the message if I disable AI, then add one AI player into BLUFOR_Player001 and I play as BLUFOR_Player002.

It only seems to show the error if I disable AI and have no one playing as the first BLUFOR player in the list...

Nothing strange

switch exits at BLUFOR_Player001 if played (so defined) skipping the nil variables for other BLUFOR slots

but if you are playing any other slot than BLUFOR_Player001, so non-played,  the switch command will fail on this nil/inexistent/undefined variable!

That's the cost for disabling AIs in lobby.

  • Like 1

Share this post


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

Yes, use the game master modules! Don't forget to specify the owner, but you have to do more!


Like this, that can't work for two reasons already mentioned:

1 - As you can see in your console results, the non-played units are not defined if you disable AI. Only the played one(s) is/are. So, the non-played owner(s), even if you wrote them in owner field of the module, are not defined.

2 - Owners are not still defined for another reason: even if you let the slots AI enabled (so the units are present/exist, hidden or not), BI decided to mask the owner in its function, until you play as him. To be more precise, here are the lines which ruin your attempt:
 

  Hide contents

 

   FROM   BIS_fnc_moduleCurator

.....

//--- Get curator owner
  _ownerVar = _logic getvariable ["owner",""];
  _ownerUID = parsenumber _ownerVar;
.....

  if (_ownerUID > 0 && !ismultiplayer) then {
    _ownerVar = player call bis_fnc_objectvar;
  };
  _isAdmin = _ownerVar == "#adminLogged" || _ownerVar == "#adminVoted";

  //--- Wipe out the variable so clients can't access it
  _logic setvariable ["owner",nil];

.....

 

you can find the complete script via function viewer from console, and the way BI manages the owner once the player is present (owner played).

 

 

The reason why I suggested you:
- never disable AI for Zeus slots;
- write an array of couples  [curator,owner] to catch everything you need, especially side of the playable units.

 

You can also set an extra variable, just f..king BI "owner" one, like:

ZeusBLUFOR002_Curator setVariable ["myHolyOwner",BLUFOR_Player002,TRUE] ;

 

But, I do insist:   BLUFOR_Player002 MUST be present/exist/non-disabled in lobby!! (you can hide/invincible him if you wish)

 

 

 

Hmm, this begins a new set of problems for my win conditions.

 

I have one piece of code (currently attached to an Eden Editor trigger) fires when my named Military Cargo Tower is destroyed.

Spoiler

Type: None

Activation: None

Activation Type: N/A

Repeatable: "Uncheck"
Server Only: "Uncheck"

Condition: !alive Military_Cargo_Tower;
On Activation: independent addScoreSide -( scoreSide independent ); west addScoreSide 250; "SideScore" call BIS_fnc_endMissionServer;

The other piece of code (also attached to an Eden Editor trigger) fires when all BLUFOR Curator players are killed.

Spoiler

Type: None

Activation: None

Activation Type: N/A

Repeatable: "Uncheck"
Server Only: "Uncheck"

Condition: ( { ( alive _x ) and ( side _x == west ) } count playableUnits ) < 1
On Activation: independent addScoreSide 250; west addScoreSide -( scoreSide west ); "SideScore" call BIS_fnc_endMissionServer;

If I hide and disable all BLUFOR playable units at the start, then unhide/enable them when a player joins and plays as one, the rest of the hidden and disabled units still need to be killed for Independent to win.

Share this post


Link to post
Share on other sites

allPlayers isNotEqualTo [] && WEST countSide allPlayers == 0

should do the trick.

I don't know if you allow unconscious player (usually captive so civilian) If yes, all players unconscious can be a problem. Then, try:

allPlayers select {side _x == WEST or lifeState _x == "incapacitated"} isNotEqualTo []

Share this post


Link to post
Share on other sites

why not just place to zues modules down and name each one to correspond with a player. ie/ zeus s1 = blufor player named s1 and zeus s2 = independent player named s2. Works for me and they both have cart blanche to do whatever they want. no scripts. easy peasy

Share this post


Link to post
Share on other sites
48 minutes ago, rowdied said:

why not just place to zues modules down and name each one to correspond with a player. ie/ zeus s1 = blufor player named s1 and zeus s2 = independent player named s2. Works for me and they both have cart blanche to do whatever they want. no scripts. easy peasy

 

If you read from the beginning, the problem is not making Zeus working, but script for them, along with the side of the units played.

I guess you suggest to write the owner's name in owner field of the module, that's already described above, (as you can't name two objects, whatever they are (module/unit/crate/trigger...) with the same name).

Share this post


Link to post
Share on other sites
19 hours ago, pierremgi said:

 

If you read from the beginning, the problem is not making Zeus working, but script for them, along with the side of the units played.

I guess you suggest to write the owner's name in owner field of the module, that's already described above, (as you can't name two objects, whatever they are (module/unit/crate/trigger...) with the same name).

Fair enough, seems like I dont fully understand what he is trying to do.
But reading what he wrote, I interpreted is like he is trying to get 2 zeuses (is that a word?) to work at the same time in a MP mission, on 2 different factions. I did this through the method I mentioned above.

I hope it gets it to work.

  • Like 1

Share this post


Link to post
Share on other sites
On 6/16/2021 at 12:42 AM, pierremgi said:

 

If you read from the beginning, the problem is not making Zeus working, but script for them, along with the side of the units played.

I guess you suggest to write the owner's name in owner field of the module, that's already described above, (as you can't name two objects, whatever they are (module/unit/crate/trigger...) with the same name).

I placed my short piece of code into the init of all the BLUFOR Curators. Seems to be doing the trick nicely!

Share this post


Link to post
Share on other sites
21 hours ago, pierremgi said:

Which "short piece of code"?

 

Place into the init of BLUFOR_Player1_1 (and so on for the other BLUFOR players).

Quote

[] spawn { 
 while { alive BLUFOR_Player1_1 } do { 
  if ( { _x distance2D BLUFOR_Player1_1 < 40 && ( side _x == independent || side _x == east ) } count allUnits > 0 ) then { 
   ZeusBLUFOR1_1_Curator removeCuratorEditingArea 1; 
    } else { 
     ZeusBLUFOR1_1_Curator addCuratorEditingArea [ 1, position BLUFOR_Player1_1, 40 ]; 
     sleep 0.05; 
    }; 
  }; 
};

 

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

×