Jump to content
Sign in to follow this  
Daves_Gaming_Adventures

end mission when only my player is in trigger

Recommended Posts

Ok This is probably a very simple one, I did look at similar posts to see if it had the answer i wanted but it doesnt. I need an end mission trigger that fires when my specific player enters the trigger zone NOT all blufor units. Reason for this is i have multiple objectives including an optional one that if not completed will leave some opfor units alive & the end mission area is in my base that has many ambient blufor units patrolling around and i dont want them accidentally activating the script when im halfway into the mission.

Share this post


Link to post
Share on other sites

link trigger to the particular unit in editor or use triggerAttachVehicle command

Share this post


Link to post
Share on other sites
link trigger to the particular unit in editor or use triggerAttachVehicle command

Yep, precisely group it (F2).

Share this post


Link to post
Share on other sites

Just tested it and it works thank you very much. This is my first mission so i appologise if im asking proper basic questions, but the strange thing is that i have been putting in some complicated triggers and scripts for some objective states, yet im scratching my head over something so basic

Share this post


Link to post
Share on other sites

How to make one specific soldier or player fire a trigger

= = = = = = = = = = = = = = = = = = = = = = = =

player in thislist; (means the trigger can only be fired by the player)

blue1 in thislist; (means the trigger can only be fired by a character named blue1)

Share this post


Link to post
Share on other sites

Going to slightly hijack this thread OP, hope you don't mind!

My question is, how to end the mission when all players are in a certain area, if any of the players aren't in the area you cant end the mission.

Also, to end the mission I have added an addAction to an AI Officer. How can I stop any player from using the addAction so only the current leader can activate the addAction and only if all players are in the vicinity.. Obviously this is MP guys.

Cheers.

Share this post


Link to post
Share on other sites

My question is, how to end the mission when all players are in a certain area, if any of the players aren't in the area you cant end the mission.

If there are only 3 players and the soldiers have names then; blue1 in thislist and blue2 in thislist and blue3 in thislist.

That is not how you use "and" I just don't have my notes handy right now.

Share this post


Link to post
Share on other sites
How can I stop any player from using the addAction so only the current leader can activate the addAction and only if all players are in the vicinity.. Obviously this is MP guys.
Straight in the officers init box.

this addAction [ "Complete Mission", {
	[ "END1", true, true ] call BIS_fnc_endMission;
},
[],
1,
true,
true,
"",
"
	_this isEqualTo leader _this
	&& {
		{ [ 'myMarkerName', _x ] call BIS_fnc_inTrigger && isPlayer _x } count playableUnits isEqualTo
		( { isPlayer _x }count playableUnits )
	}
"
];

Where 'myMarkerName' is either the name of a marker (or a trigger name without the ' ) that the players need to be in.

As its in the init the action will be added for every player that joins but will only be visible by a leader.

EDIT : changed above, second count of playableUnits will need to be in brackets.

Edited by Larrow

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
Sign in to follow this  

×