SteelSampson 1 Posted June 5, 2013 What do I put in the condition field of a trigger if I want it to activate when ALL 4 objects are in inside the trigger area? I tried this with no success: obj1 && obj2 && obj3 && obj4 in thislist; Also tried: myObjects = [obj1,obj2,obj3,obj4]; myObjects in thislist; Share this post Link to post Share on other sites
Larrow 2822 Posted June 6, 2013 ({_x in thislist} count [obj1, obj2, obj3, obj4] == 4) Share this post Link to post Share on other sites
SteelSampson 1 Posted June 6, 2013 For some reason this isn't working for me. ({_x in thislist} count [obj1, obj2, obj3, obj4] == 4) I also have tried: This && ({_x in thislist} count [obj1, obj2, obj3, obj4] == 4) ({_x in thislist} count [obj1, obj2, obj3, obj4] > 3) This && ({_x in thislist} count [obj1, obj2, obj3, obj4] > 3) with as many different variations in trigger activation I could think of. I also made the trigger needlessly large to make sure it covered the area needed. The onAct field works fine when I test the trigger as a basic blufor activated trigger. Any ideas? Share this post Link to post Share on other sites
filamod 3 Posted June 6, 2013 In trigger: activation: anybody condition: (obj1 in thislist) && (obj2 in thislist) && (obj3 in thislist) && (obj4 in thislist); 1 Share this post Link to post Share on other sites
mindstorm 8 Posted June 6, 2013 That wont work. Thislist is a trigger only containing the objects triggering the trigger. E.g. players or vehicles. Not Objects. If you want to work this you are probably best of comparing distance of objects e.g. (obj1 distance getMarkerPos "mymarker" < 100) && obj2 ~ Share this post Link to post Share on other sites
filamod 3 Posted June 6, 2013 Of course it will work! All you have to name the objects(soldier, barrel, suitcase, ...) obj1, obj2, obj3, obj4 Share this post Link to post Share on other sites
f2k sel 164 Posted June 6, 2013 (edited) I'm going with your both right and wrong. Some objects can be detected by triggers and some can't. you can use a function to check if an abject is with the trigger area cond { [thistrigger, _x] call BIS_fnc_inTrigger } count [obj1,obj2,obj3, obj4 ] > 0 that is basically doing the distance check but where the distance check only checks a radius this will check the actual trigger area and will check any object. Edited June 6, 2013 by F2k Sel Share this post Link to post Share on other sites
kamaradski 10 Posted October 24, 2013 Hi there, I'm trying to do sort of the same, but via setTriggerStatements. Reading the forums, I came up with 3 different ways to do it, and even though the first one works via the editor, it wont work via script. Any help re-formatting or re-phrasing would be much appriciated ! _Ktrg1 setTriggerStatements ["what = getpos thistrigger nearobjects ["Land_CargoBox_V1_F",10];count what > 1","_Fblu="WIN"","_Fblu="LOOSE""]; _Ktrg1 setTriggerStatements ["{ [thistrigger, _x] call BIS_fnc_inTrigger } count [obj1,obj2,obj3, obj4 ] > 0","_Fblu="WIN"","_Fblu="LOOSE""]; _Ktrg1 setTriggerStatements ["(cargo1 in thislist) AND (cargo2 in thislist)","_Fblu="WIN"","_Fblu="LOOSE""]; I try to detect 2 objects entering the trigger area: type: Land_CargoBox_V1_F names: cargo1 & cargo2 Share this post Link to post Share on other sites
Johnson11B2P 3 Posted October 24, 2013 Hi there,I'm trying to do sort of the same, but via setTriggerStatements. Reading the forums, I came up with 3 different ways to do it, and even though the first one works via the editor, it wont work via script. Any help re-formatting or re-phrasing would be much appriciated ! _Ktrg1 setTriggerStatements ["what = getpos thistrigger nearobjects ["Land_CargoBox_V1_F",10];count what > 1","_Fblu="WIN"","_Fblu="LOOSE""]; _Ktrg1 setTriggerStatements ["{ [thistrigger, _x] call BIS_fnc_inTrigger } count [obj1,obj2,obj3, obj4 ] > 0","_Fblu="WIN"","_Fblu="LOOSE""]; _Ktrg1 setTriggerStatements ["(cargo1 in thislist) AND (cargo2 in thislist)","_Fblu="WIN"","_Fblu="LOOSE""]; I try to detect 2 objects entering the trigger area: type: Land_CargoBox_V1_F names: cargo1 & cargo2 You need double quotes. _Ktrg1 setTriggerStatements ["{ [thistrigger, _x] call BIS_fnc_inTrigger } count [obj1,obj2,obj3, obj4 ] > 0","_Fblu=""WIN""',"_Fblu=""LOOSE"""]; Share this post Link to post Share on other sites
kamaradski 10 Posted October 26, 2013 (edited) Thanks Johnson, However that didnt work for me, as soo as i put any of mine or your solution in there the whole function doesnt execute. If i do enter a default example from BIS WIKI it works fine, but doesnt trigger ofcourse when i want it to. back to the drawingboard i guess... _trg setTriggerStatements ["this", "hint 'trigger on'", "hint 'trigger off'"] Figured it out, it was doublequotes all along :) Cheers Johnson !!! _Ktrg1 setTriggerStatements ["this; what = getMarkerPos""KVIKOS"" nearobjects [""Land_CargoBox_V1_F"",10];count what > 1","_Fblu=""WIN""","_Fblu=""LOOSE"""]; Edited October 26, 2013 by kamaradski Share this post Link to post Share on other sites
Johnson11B2P 3 Posted October 26, 2013 Welcome to the struggle of scripting. Share this post Link to post Share on other sites
Barba-negra 117 Posted April 11, 2018 Hello everyone, I came here because I am currently working on something similar in activators through objects, and I found a solution and wanted to share it with you. the way I do it is crazy but it worked perfectly; You put in the condition: call {this && ({_x in thislist} count [a1]> 0)} in activation the scritps or whatever you activate you put the activator with bluford activation then in the editor place the object with the name of p2, it can be any variable name, then place a bluford soldier on the map without weapons and you will call it a1- then the object that you want to activate the trigger with the variable name p2 in the ini box you place this a1 attachTo [p2, [0, 0, 0]]; and finally the soldier bluford a1 in the init box you place hideobject this; And that will keep it hidden on the map, and everything works perfectly, you can move the object to the activation area and it works. I hope it works for what you want to do, greetings. Share this post Link to post Share on other sites