Mebeover 0 Posted July 12, 2021 Hi, I'm relatively new to mapmaking and have been so far learning through trial and error (mostly error), but am currently rather stumped with a problem vastly outside my base of experience. I am trying to set a trigger to activate when players collect any 3 pieces of intel (of 6 available), regardless of the combination of intel collected. Only 3 pieces need to be found, and currently I am referencing their collection via a seperate trigger with 'thisNull objectName', as the intel is deleted on pickup, and then trying to get another trigger to check 'triggerActivated triggerName' (horribly inefficient, I know). Apologies if this doesn't make much sense, its 3am and mission making has fried my brain. Any help would be greatly appreciated. Share this post Link to post Share on other sites
Smart Games 76 Posted July 12, 2021 Here is an example of a solution, even if the trigger could have been omitted. The whole thing is not particularly variable in use, but it offers a good basis. Just take a look at it:https://ufile.io/3xkho8j3 Share this post Link to post Share on other sites
major-stiffy 281 Posted July 12, 2021 Tweaked this from a script @Larrow some time ago. Tweak it to suit your needs. { _x addAction ["<t align='left' color='#F7D358'>READ CONTENTS</t>", { params[ "_target", "_caller", "_ID", "_args" ]; //Set this examined intel as found, so the action on it is no longer active //Also PV to all clients so their action for this box is no longer active _target setVariable ["isFound", true, true]; //Get the number of boxes found, default 0 _currentFoundBoxes = _caller getVariable[ "boxesFound", 0 ]; //Increase count by 1 _currentFoundBoxes = _currentFoundBoxes + 1, execVM "scripts\yourscript.sqf"; //Update callers variable _caller setVariable [ "boxesFound", _currentFoundBoxes ]; //Maybe do something when # of intel have been found if ( _currentFoundBoxes isEqualTo 3 ) then { ["<t color='#ff0000' size = '1.5'>Intel found...STAND-BY.</t>",-1,-1,8,1,-1,789] spawn BIS_fnc_dynamicText; sleep 10; execVM "scripts\yourscript.sqf"; //CHANGE THIS TO WHEN ALL INTEL FOUND }; }, [], 6, true, true, "", //_target (unit to which action is attached to) and _this (caller/executing unit) "!( _target getVariable [ 'isFound', false ] )", //NOT found ( default false ) !false == true 4 //distance for action ]; }forEach [ intel0, intel1, intel2 ]; When intel isEqualTo 3 it must match the amount of forEach. You can change it the amount to suit. That's all I have to offer. Good luck. Share this post Link to post Share on other sites
pierremgi 4923 Posted July 12, 2021 3 hours ago, Mebeover said: I am trying to set a trigger to activate when players collect any 3 pieces of intel (of 6 available), regardless of the combination of intel collected. Welcome on forum. If you named the 6 intel pieces, say Int1, Int2, Int3... You just need a trigger none, none , not repeatable, the condition is: {isNull _x} count [Int1,Int2,Int3,Int4,Int5,Int6] > 2 If there is no name on them: count (allMissionObjects "all" select {"intel" in toLowerANSI getText (configFile /"cfgVehicles" / typeOf _x / "vehicleClass")}) <4 3 Share this post Link to post Share on other sites
Joe98 92 Posted July 12, 2021 1 hour ago, pierremgi said: If you named the 6 intel pieces, say Int1, Int2, Int3... You just need a trigger none, none , not repeatable, the condition is: {isNull _x} count [Int1,Int2,Int3,Int4,Int5,Int6] > 2 As he said, use that. . Share this post Link to post Share on other sites
Mebeover 0 Posted July 13, 2021 (edited) 11 hours ago, pierremgi said: Welcome on forum. If you named the 6 intel pieces, say Int1, Int2, Int3... You just need a trigger none, none , not repeatable, the condition is: {isNull _x} count [Int1,Int2,Int3,Int4,Int5,Int6] > 2 If there is no name on them: count (allMissionObjects "all" select {"intel" in toLowerANSI getText (configFile /"cfgVehicles" / typeOf _x / "vehicleClass")}) <4 Thanks so much! Edited July 13, 2021 by Mebeover quoted wrong person Share this post Link to post Share on other sites