Jump to content
major woody

Sync Support Requester to Vehicle rather than player

Recommended Posts

I'm trying to create a small independent Mortar Team. I would like to create a Forward Observer (FO) vehicle. In the editor I have:

 

  1. Placed 1 Strider
  2. Placed 4 Mortars
  3. Placed 1 Support Requester Module
  4. Placed 1 Support Provider (Artillery)

 

Synced the mortars to the Support Provider >> Synced The Provider to the Support Requester >> Synced The Requester to the Strider...  - NOTHING happens...!

 

If I drag the playerout of the Strider and sync him to the Requester - then SUCCESS...!  - but I how can I add the request features to the vehicles - not the player...?

 

AAF_Mortar_Team.jpg?dl=0

Share this post


Link to post
Share on other sites

You cannot, the supports use the comm menu and is designed to be linked to a player.

You could sync it to the driver, maybe even use getIn and getOut events and link/unlink an entering player to the  requester.

Spoiler

if ( isServer ) then {
	
	this addEventHandler[ "GetIn", {
		params[ "_vehicle", "_position", "_unit", "_turretPath" ];
		
		if ( isPlayer _unit ) then {
			[ _unit, requestorModuleName, providerModuleName ] call BIS_fnc_addSupportLink;
		};
	}];
	
	this addEventHandler[ "GetOut", {
		params[ "_vehicle", "_position", "_unit", "_turretPath" ];
		
		if ( isPlayer _unit ) then {
			requestorModuleName synchronizeObjectsRemove[ _unit ];
			missionNamespace setVariable[ "BIS_supp_refresh", true, owner _unit ];
		};
	}];
	
};

Placed in the Striders init. Where requestor/providerModuleName is the variable name given to each in the editor.

 

  • Like 1

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

×