Jump to content

Recommended Posts

Hey guys!

 

I have a mission where players can choose to be blufor, opfor and independent. Each leader of a faction has an endtrigger synced to them that should end the mission when the unit enters it. I have the triggers and debriefing working fine in singleplayer, but in multiplayer I am not able to force the end on the clients even though I use [endMission, "END1" ] call BIS_fnc_MP; in the respective trigger for each side.

 

What am I doing wrong? I found a lot of threads where people say to execute the functions on the clients, but I just can't seem to grasp how to do this.

 

Cheers!

Share this post


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

Hey guys!

 

I have a mission where players can choose to be blufor, opfor and independent. Each leader of a faction has an endtrigger synced to them that should end the mission when the unit enters it. I have the triggers and debriefing working fine in singleplayer, but in multiplayer I am not able to force the end on the clients even though I use [endMission, "END1" ] call BIS_fnc_MP; in the respective trigger for each side.

 

What am I doing wrong? I found a lot of threads where people say to execute the functions on the clients, but I just can't seem to grasp how to do this.

 

Cheers!

 

I recommend using RemoteExecCall instead. And you can target a side if you want one side to win and the other to fail. 

[<params1>, <params2>] remoteExecCall ["someScriptCommand", targets, JIP];
["End1", true, true] remoteExecCall ["BIS_FNC_EndMission", west, false]; // victory

Untested but you should be able to figure it out.

Share this post


Link to post
Share on other sites

BIS_fnc_endMission called using a script (and previously a trigger) works just fine for me. Worked for all players + JIP. I'm not using a dedicated server, so it could be different. I'm not very experienced in that regard.

 

My ending setup in description.ext:

class CfgDebriefing
{

	class End1
	{
		title = "VICTORY";
		subtitle = "All Caches Destroyed";
		description = "You have successfully located and destroyed all enemy caches!";
	};
};

 

Called using this code:

"End1" call BIS_fnc_endMission;

 

Share this post


Link to post
Share on other sites
18 hours ago, rebitaay said:

BIS_fnc_endMission called using a script (and previously a trigger) works just fine for me. Worked for all players + JIP. I'm not using a dedicated server, so it could be different. I'm not very experienced in that regard.

 

My ending setup in description.ext:


class CfgDebriefing
{

	class End1
	{
		title = "VICTORY";
		subtitle = "All Caches Destroyed";
		description = "You have successfully located and destroyed all enemy caches!";
	};
};

 

Called using this code:


"End1" call BIS_fnc_endMission;

 

 

Ok, so what you're saying is that my trigger calls a script in my mission folder that contains BIS_fnc_endMission? Is it because whatever is put in the "on activation" of a trigger only executes locally?

Share this post


Link to post
Share on other sites
4 hours ago, Schismatrix said:

 

Ok, so what you're saying is that my trigger calls a script in my mission folder that contains BIS_fnc_endMission? Is it because whatever is put in the "on activation" of a trigger only executes locally?

 

I'm not sure what your issue is. I'm saying that it works just fine on my server using the codes I gave you, and it may be worth giving it a try.

You put the first code in your description.ext to define "End1", and to call the script, put the second code in the "on activation" box of your trigger.

Share this post


Link to post
Share on other sites

Well, the problem is locality I think. I have done what you said (first part in description, second part in trigger) and it works fine singleplayer, but not in multiplayer.

 

here's my setup:

trigger 1 is set to execute when the synced owner is present (opfor)

trigger 2 is set to execute when synced owner (blufor) is present

 

both triggers have their respective "call BIS_fnc_endMission" that refers to the description.ext.

 

When my friend and I test it on our LAN, it works for me, but not for him. When he enters the opfor trigger as opfor, I get a MISSION FAILED, but he gets nothing. He keeps being able to run around in the mission. This must mean that the script is not run on clients, hence my suspicion of locality issues.

Share this post


Link to post
Share on other sites

Sounds like you've ticked the 'Server Only' tickbox on the Trigger.

 

Replace the activation code with, as hallyg mentions above.

["End1"] call BIS_fnc_endMissionServer;

Share this post


Link to post
Share on other sites

Thank you guys! I got it working with "End1" call BIS_fnc_endMissionServer; in the -On Activation- field of the trigger. This seems to be best practice, and works with the different endings defined in description.ext

 

It seems strange to me that triggers can't be adjusted for global or local triggering via the dropdown menus at the top, but whatevs.. It works, and I'm happy!

Share this post


Link to post
Share on other sites

I am currently have a issue where, with two different endings in my description.ext, and two different triggers set in my multiplayer mission....only one ending will display. I will attempt to get the coding in here so someone smarter than ,e can help.

 

 It is weird. I preview the mission, and use all my respawns .... the trigger fires and the correct ending is shown. (If Blu For runs out of respawns, I see a "Op For wins!" display that I typed into my description.ext. However, if I then jump back in an test the other side of it (Op For running out of respawns), I still get the "Op For wins! ending. The wrong one.

 

 I shut down Arma, open up the Editor, test the mission. Op For runs out of respawns----> Blu For wins! Great, but. Then I test it a second time, and (with Blu For running out of respawns), I get the "Blu For wins!" ending. Only the first instance of the testing works. And I am backing out to the Editor between tests, then "Play in Multiplayer". Any ideas?

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

×