Jump to content

technical question


Aegis_RVIR

Recommended Posts

Started work on a new scenario to hopefully share in due time, however there is a slight snag in the process.

 

I am trying to have a ship (the standard destroyer in the game) have multiple unmanned turrets (Hammer, Spartan, Praetorian and the VLS) and an UAV that start out neutral to all sides and will remain so if neither CSAT or NATO decide to interfere with it. However, if any given side enter the bridge and interact with a data terminal set up there the turrets and UAV would flip to their side making them able to use the ship and its weapons. If the other side so desires, they can also attempt boarding the ship and interacting the terminal flipping the weapons and the UAV to their side. 

This is meant for to add some extra layer of decision making to the scenario, to chase the objective or to secure the ship and its armaments in order to get a leg up on the other side. Problem is, I have 0 idea of how to make this all a reality. If you have any suggestions or want to help please let me know.

20190313193142_1.jpg

20190313193231_1.jpg

20190313193258_1.jpg

Link to comment
Share on other sites

Create a trigger on the bridge an in the onactivation field add something along the lines of:

_friendlySide = side (_thisList select 0);
_unitType = "I_officer_F";
if (_friendlySide == west) then {_unitType = "B_officer_F"}; 
if (_friendlySide == east) then {_unitType = "O_officer_F"};
_grp = createGroup [_friendlySide, true];
_unit = _grp createUnit [_unitType, [0,0,0], [], 0, "NONE"];

{
  	if (count(crew _x) == 0) then {
    	createvehiclecrew _x;
    };
	(crew _x) join _grp;
} forEach [UAV_1, UAV_2, ...];

deleteVehicle(_unit);

There might still be syntax errors in there, I didn't test it.  Replace the UAV_1, UAV_2, ... with the names you've given to your turrets. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Forum Statistics

    11.1k
    Total Topics
    66.5k
    Total Posts
×
×
  • Create New...