Jump to content
Tankbuster

Using Zeus as ad hoc FOB creator?

Recommended Posts

Guys,

I'm ashamed to admit I only fired up Zeus for the first time 3 days ago. Change scares me but I am now dipping my toe, so to speak. :)

 

I've read the wiki and done some Google searching, and have made some progress, but might need a little guidance.

 

I have the Zeus module in and can apply it to one player and can get the interface up, can limit the objects he can get at and that's all lovely, but here's precisely what I want to do but have not yet found the way.

 

I want to use Zeus as an ad hoc FOB creator, the driver of this vehicle to be forced into the Zeus interface and have him place static weapons, sandbags, HESCOs and a helipad near his vehicle. When he's finished, I want to him to be locked out of Zeus until the next time he deploys the FOB vehicle. Only the driver of this vehicle can use Zeus and only when he's selected to deploy.

 

Any help would be greatly appreciated.

  • Like 1

Share this post


Link to post
Share on other sites

I quite like this idea so thought i would have a little test. This is by no means a fleshed out and MP compatible or most likely error free example but..

this addAction [ "Deploy FOB", {
        
        
        h = _this spawn {
            
            params [
                "_target",
                "_caller",
                "_id",
                "_args"
            ];
            
            switch ( _target getVariable [ "FOBDeployed", false ] ) do {
                case ( false ) : {
                    _caller assignCurator GM;
                    openCuratorInterface;
                    
                    waitUntil { !isNull curatorCamera };
                    
                    curatorCamera setPosATL ( ( _caller getRelPos [ 10, ( getDir _target ) + 90 ] ) vectorAdd [ 0, 0, 15 ] );
                    curatorCamera setDir ( curatorCamera getRelDir _target );
                    [ curatorCamera, -45, 0 ] call BIS_fnc_setPitchBank;
                                
                    GM addCuratorCameraArea [ 1, getPosATL _target, 50 ];
                    GM addCuratorEditingArea [ 1, getPosATL _target, 50 ];
                    
                    removeAllCuratorAddons GM;
                    GM addCuratorAddons [ "A3_Structures_F_Mil_Fortification", "A3_Structures_F_Mil_Shelters", "A3_Static_F" ];                    
                    
                    waitUntil { isNull curatorCamera };
                    
                    _target setVariable [ "FOBItems", curatorEditableObjects GM ];
                    _target setVariable [ "FOBDeployed", true ];
                    _target setUserActionText [ _id, "Break down FOB" ];
                    _target setVariable [ "Fuel", fuel _target ];
                    _target setFuel 0;
                    unassignCurator GM;
                };
                case ( true ) : {
                    
                    {
                        deleteVehicle _x;
                    }forEach ( _target getVariable [ "FOBItems", [] ] );
                    
                    _target setFuel ( _target getVariable "Fuel" );
                    _target setVariable [ "FOBItems", [] ];
                    _target setVariable [ "FOBDeployed", false ];
                    _target setUserActionText [ _id, "Deploy FOB" ];
                };
                
            };
            
            
        };
    },
    [],
    1,
    false,
    true,
    "",
    "speed _target isEqualTo 0 && { driver _target isEqualTo _this }"
];
Placed in the init of a vehicle, GM is a modules > Zeus > Gamemaster with Owner set to objnull and addons set to None.

Literally all i have done is placed the vehicle, a unit for the player and the GM and test in the editor preview.

Share this post


Link to post
Share on other sites

One of my guys has done this when I asked him. He hints the player (who drives the FOB vehicle) to press Y when the little FOB composition has finished spawning. The FOB boss can then put down some sandbags, a couple of statics and a helipad. I wanted to force the vehicle driver into the zeus interface, but I was outvoted. :)

  • Like 1

Share this post


Link to post
Share on other sites

G'day Tankbuster, I was wondering if perhaps you could share some of what you've learned?

Like you I'm looking to have a FOB style system but based around a Huron cargo container and a specific player slot (Engineer).

 

So far I've managed to limit the availability of Zeus to within a certain radius of the container but now I'm stuck at my next two points:

1: Limited the types of objects placable by Zeus - really only fortifications

2: Define a set number of resources available so that Zeus closes once those resources are expired

 

The idea being to have to airlift this crate to a certain spot, build the FOB and then later defend it against an attack.

 

Any help you could offer would be greatly appreciated. :)

 

 

EDIT:  Nevermind, I have successfully figured this out and implemented it via some tricky trigger work and the Zeus modules.

Share this post


Link to post
Share on other sites

Ah, you've fixed it up? TBH, this wasn't done by me but a member of my team. He said that there's a way to give  a list of classnames that the curator can use. I assume that's how you did it too?

Share this post


Link to post
Share on other sites

Ive got it to the point Im happy with but if your team mate can specify how to add specific objects via class name rather than by config type that tould be brilliant.

Share this post


Link to post
Share on other sites

I'll get the entire mission folder to you in the next couple of days

Share this post


Link to post
Share on other sites

I quite like this idea so thought i would have a little test. This is by no means a fleshed out and MP compatible or most likely error free example but..

this addAction [ "Deploy FOB", {
        
        
        h = _this spawn {
            
            params [
                "_target",
                "_caller",
                "_id",
                "_args"
            ];
            
            switch ( _target getVariable [ "FOBDeployed", false ] ) do {
                case ( false ) : {
                    _caller assignCurator GM;
                    openCuratorInterface;
                    
                    waitUntil { !isNull curatorCamera };
                    
                    curatorCamera setPosATL ( ( _caller getRelPos [ 10, ( getDir _target ) + 90 ] ) vectorAdd [ 0, 0, 15 ] );
                    curatorCamera setDir ( curatorCamera getRelDir _target );
                    [ curatorCamera, -45, 0 ] call BIS_fnc_setPitchBank;
                                
                    GM addCuratorCameraArea [ 1, getPosATL _target, 50 ];
                    GM addCuratorEditingArea [ 1, getPosATL _target, 50 ];
                    
                    removeAllCuratorAddons GM;
                    GM addCuratorAddons [ "A3_Structures_F_Mil_Fortification", "A3_Structures_F_Mil_Shelters", "A3_Static_F" ];                    
                    
                    waitUntil { isNull curatorCamera };
                    
                    _target setVariable [ "FOBItems", curatorEditableObjects GM ];
                    _target setVariable [ "FOBDeployed", true ];
                    _target setUserActionText [ _id, "Break down FOB" ];
                    _target setVariable [ "Fuel", fuel _target ];
                    _target setFuel 0;
                    unassignCurator GM;
                };
                case ( true ) : {
                    
                    {
                        deleteVehicle _x;
                    }forEach ( _target getVariable [ "FOBItems", [] ] );
                    
                    _target setFuel ( _target getVariable "Fuel" );
                    _target setVariable [ "FOBItems", [] ];
                    _target setVariable [ "FOBDeployed", false ];
                    _target setUserActionText [ _id, "Deploy FOB" ];
                };
                
            };
            
            
        };
    },
    [],
    1,
    false,
    true,
    "",
    "speed _target isEqualTo 0 && { driver _target isEqualTo _this }"
];
Placed in the init of a vehicle, GM is a modules > Zeus > Gamemaster with Owner set to objnull and addons set to None.

Literally all i have done is placed the vehicle, a unit for the player and the GM and test in the editor preview.

how to change this script to working on dedicated server?

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

×