need help with Zeus

  1. ‹ Older
  2. 8 years ago

    Where are your priorities, Dixon? ARMA first! :)

  3. Edited 8 years ago by Legend117

    Thank you again, you're very kind! If it's not too much to ask, is it also possible through your script to make it working with more than one zeus module (for example, a blufor zeus which needs hidden opfor and indfor units, and an opfor zeus which needs hidden blufor and indfor units)?

  4. fnc_handleUnit.sqf

    params [["_unit",objNull]];
    if (side _unit == EAST) then {
        curatorModule removeCuratorEditableObjects [[_unit],true];
    };
  5. Edited 8 years ago by maquez [Q-Net]

    wow, thank you very much! Will try this.

    I have only few questions still remaining regarding "fnc_handleUnit.sqf".
    I have three factions in my mission with a Zeus module for each side named:

    "z_west", "z_east" and "z_guer"

    so how do I need edit the "fnc_handleUnit.sqf" script that it does handle all three factions?

    what I did try to script myself so far is follow:

    description.ext

    #define QUOTE(var1) #var1
    class Extended_Init_EventHandlers { 
        class CAManBase { 
     		serverInit = QUOTE(_this call compile preprocessFileLineNumbers 'fnc_handleUnitWest.sqf,fnc_handleUnitEast.sqf,fnc_handleUnitGuer.sqf');
        }; 
    };

    fnc_handleUnitWest.sqf

    params [["_unit",objNull]];
    if (side _unit == EAST) then {
        z_west removeCuratorEditableObjects [[_unit],true];
    };
    if (side _unit == RESISTANCE) then {
        z_west removeCuratorEditableObjects [[_unit],true];
    };

    fnc_handleUnitEast.sqf

    params [["_unit",objNull]];
    if (side _unit == WEST) then {
        z_east removeCuratorEditableObjects [[_unit],true];
    };
    if (side _unit == RESISTANCE) then {
        z_east removeCuratorEditableObjects [[_unit],true];
    };

    fnc_handleUnitGuer.sqf

    params [["_unit",objNull]];
    if (side _unit == WEST) then {
        z_guer removeCuratorEditableObjects [[_unit],true];
    };
    if (side _unit == EAST) then {
        z_guer removeCuratorEditableObjects [[_unit],true];
    };

    could you have a look at this and tell me if I scripted bullshit
    and if answer is yes, correct what I did wrong?

    had no time to test what I scripted...

    thanks in advance
    maquez [Q-Net]

  6. Cleaned up your code and everything is in one file.

    description.ext

    #define QUOTE(var1) #var1
    class Extended_Init_EventHandlers { 
        class CAManBase { 
     		serverInit = QUOTE(_this call compile preprocessFileLineNumbers 'fnc_handleUnit.sqf'); 
        }; 
    }; 

    fnc_handleUnit.sqf

    params [["_unit",objNull]];
    switch (side _unit) do {
        case WEST: {
            z_east removeCuratorEditableObjects [[_unit],true];
            z_guer removeCuratorEditableObjects [[_unit],true];
        };
        case EAST: {
            z_west removeCuratorEditableObjects [[_unit],true];
            z_guer removeCuratorEditableObjects [[_unit],true];
        };
        case RESISTANCE: {
            z_west removeCuratorEditableObjects [[_unit],true];
            z_guer removeCuratorEditableObjects [[_unit],true];
        };
        default { diag_log format ["fnc_handleUnit: Side is civilian. No objects were removed for the curator."]; };
    };
  7. Deleted 8 years ago by maquez [Q-Net]
  8. Edited 8 years ago by maquez [Q-Net]

    I did test it in editor and on dedicated, it did not work I was still able to edit and see all sides.

    may I have to explain better my goals:
    my mission is a TVT/PVP mission with three playable Zeus and my goal is to remove
    the editable objects and visible units of the opposite sides for each zeus.

    z_west: should be able only to edit WEST objects, RESISTANCE and EAST should be invisible, not editable
    z_east: should be able only to edit EAST objects, RESISTANCE and WEST should be invisible, not editable
    z_guer: should be able only to edit RESISTANCE objects, EAST and WEST should be invisible, not editable

    z_west is synced to squad leader WEST
    z_east is synced to squad leader EAST
    z_guer is synced to squad leader RESISTANCE

    all three zeus are playable at the same time by different players (TVT/PVP mission)

    damn, sorry my english... not my native language hope you can understand

    kind regards
    maquez [Q-Net]

  9. I tested it too, and I'm sorry to confirm it doesn't work, unfortunately ..

  10. Can anyone else chime in on this. I'm at work and can't test, unless I install Arma on this computer lols.

  11. Edited 8 years ago by maquez [Q-Net]

    I enabled functions logging to rpt during testing script.
    The function does not get loaded if this help.

    I would really appreciate any help I'm out of ideas and BI wiki is a bad joke instead of any use full information.

  12. Edited 8 years ago by maquez [Q-Net]

    another try...
    script seems to work at least
    I can see and edit every freaking stuff of mission
    but still I can edit and see enemy sides, damn this drives me soon crazy...

    please anyone can have a look at this and help me?

    I soon get headaches and a big hate on BI wiki,
    most useless crap I ever seen.

    init.sqf

    if (isServer) then {
    [] execVM "zeus.sqf";
    }; 

    zeus.sqf

    if (!isServer) exitWith{};
    
    sleep 60;
    {
    	z_west addCuratorEditableObjects [[_x],true];
    	z_east addCuratorEditableObjects [[_x],true];
    	z_guer addCuratorEditableObjects [[_x],true];
    } foreach (allMissionObjects "All");
    
    while {true} do {
          sleep 30; {
    	    if ((side _x) == west || (side _x) == east || (side _x) == independent) then {
    			z_west addCuratorEditableObjects [[_x],true];
    			z_east addCuratorEditableObjects [[_x],true];
    			z_guer addCuratorEditableObjects [[_x],true];
    	     };
           }foreach allUnits;
    };	
    
    case WEST: {
    	if ((side _x) == east || (side _x) == resistance) then {
    		z_west removeCuratorEditableObjects [[_x],true];
    	};
    };
    case EAST: {	
    	if ((side _x) == west || (side _x) == resistance) then {
    		z_east removeCuratorEditableObjects [[_x],true];
    	};
    };
    case RESISTANCE: {	
    	if ((side _x) == west || (side _x) == east) then {	
    		z_guer removeCuratorEditableObjects [[_x],true];	
    	};
    };

    link to BI forum where the code is better readable: BI Forum

    kind regards
    maquez [Q-Net]

  13. Edited 8 years ago by maquez [Q-Net]

    problem solved

    a special thank towards all those that helped me in this case

    specially to mention are belbo and spyderblack723 for outstanding help

  14. Edited 8 years ago by dixon13

    Glad you figured it out @maquez Q-Net. Could you please post your solution as well for future reference if someone is browsing and stumbles across this forum post.

  15. Solution is in this post
    https://forums.bistudio.com/topic/187461-need-help-with-zeus-make-zeus-faction-sided/?p=2968996

  16. for solution to make zeus faction sided follow these steps:
    make zeus faction sided

    kind regards
    maquez [Q-Net]

  17. 7 years ago

    Hi, I'm able to get this script to work with no problem using player hosted servers, however, I need it to work on dedicated server and am having no luck. Can anyone help me out with that? Very many thanks in advance :-)

  18. Check the linked BIS forum stuff in Spyderblack's post there might be more info. Pretty sure Maquez needed this for a dedicated server so I'd be surprised if it didn't work.

  19. Thanks very much for the response, SavageCDN. I'll check that out :-)

  20. To confirm, SavageCDN, you are correct. I had simply made a change to the script and forgot about it. Once I went back to exactly what was in the BIS forum it worked flawlessly on dedicated server. I guess this is my warm welcome to the ALiVE community. Thank you very much again :-)

  21. You're welcome enjoy!

 

or Sign Up to reply!