Wiki 1558 Posted March 30, 2016 Hi guys. How can I activate a trigger by putting a demo charge or satchel charge please? I need to make the objective "place the charge" on a specific spot. The, when the player places it, the objective gets complete. Thanks a lot. Share this post Link to post Share on other sites
davidoss 551 Posted March 30, 2016 Trigger : shape and size useless Type : None Activation None Condition : !isNull nearestObject [thisTrigger, "SatchelCharge_Remote_Ammo"] for both !isNull nearestObject [thisTrigger, "SatchelCharge_Remote_Ammo"] || !isNull nearestObject [thisTrigger, "DemoCharge_Remote_Ammo"] Hard coded radius is 50 meters. Share this post Link to post Share on other sites
Wiki 1558 Posted March 30, 2016 Ok, I'll try it ASAP, thanks. Do you know how to change the radius value? Thanks Share this post Link to post Share on other sites
sarogahtyp 1108 Posted March 30, 2016 i would assume (0< ((typeOf _x == "SatchelCharge_Remote_Ammo") or (typeOf _x =="DemoCharge_Remote_Ammo")) count _thislist) should work for all objects in trigger radius Share this post Link to post Share on other sites
Wiki 1558 Posted March 30, 2016 Trigger : shape and size useless Type : None Activation None Condition : !isNull nearestObject [thisTrigger, "SatchelCharge_Remote_Ammo"] for both !isNull nearestObject [thisTrigger, "SatchelCharge_Remote_Ammo"] || !isNull nearestObject [thisTrigger, "DemoCharge_Remote_Ammo"] Hard coded radius is 50 meters. Thanks, it works! :) But sill, no idea about how to decrease the radius value... :( i would assume (0< ((typeOf _x == "SatchelCharge_Remote_Ammo") or (typeOf _x =="DemoCharge_Remote_Ammo")) count _thislist) should work for all objects in trigger radius Sry, doesn't work: it says there is a local variable in global space :( Share this post Link to post Share on other sites
sarogahtyp 1108 Posted March 30, 2016 it could be thislist idk just try! the logic should be ok. issue should be syntax i wont check that i m on phone... Share this post Link to post Share on other sites
jshock 513 Posted March 30, 2016 It's thisList, no "_" Share this post Link to post Share on other sites
killzone_kid 1329 Posted March 30, 2016 Create a triggerGroup it with player Set to activate on PRESENT Add code: (inArea command might not be in stable yet) //CONDITION: this && { { if ( typeOf _x in ["SatchelCharge_Remote_Ammo", "DemoCharge_Remote_Ammo"] && {_x inArea thisTrigger} ) exitWith {1} } count detectedMines side player > 0 } //ON ACT. hint "BOOM" Share this post Link to post Share on other sites
sarogahtyp 1108 Posted March 30, 2016 @killzone_kid could u explain why urs is a better solution than mine please? i d like to learn something... Share this post Link to post Share on other sites
jshock 513 Posted March 30, 2016 It's a bit more optimized and doesn't rely on the list of the trigger. Share this post Link to post Share on other sites
killzone_kid 1329 Posted March 30, 2016 @killzone_kid could u explain why urs is a better solution than mine please? i d like to learn something... Mine works yours doesn't ;). Placed charges are not detected by the trigger detector so thisList will be []. 1 Share this post Link to post Share on other sites
Wiki 1558 Posted March 30, 2016 Create a trigger Group it with player Set to activate on PRESENT Add code: (inArea command might not be in stable yet) //CONDITION: this && { { if ( typeOf _x in ["SatchelCharge_Remote_Ammo", "DemoCharge_Remote_Ammo"] && {_x inArea thisTrigger} ) exitWith {1} } count detectedMines side player > 0 } Do I add all this in "condition" of the trigger? Cause right now, doesn't work, I got error message... :( Share this post Link to post Share on other sites
Wiki 1558 Posted March 30, 2016 it could be thislist idk just try! the logic should be ok. issue should be syntax i wont check that i m on phone... It's thisList, no "_" So, I tried this one with "thislist" instead of "_thislist", and doesn't work either. Share this post Link to post Share on other sites
jshock 513 Posted March 30, 2016 So, I tried this one with "thislist" instead of "_thislist", and doesn't work either. KK covered the reason why it won't work: Placed charges are not detected by the trigger detector Share this post Link to post Share on other sites
davidoss 551 Posted March 30, 2016 If the KK code is not working for you, you could try use trigger size and Bis_fnc_Intrigger. [thisTrigger, object] call BIS_fnc_inTrigger // returns true if the object is inside trigger. Share this post Link to post Share on other sites
Wiki 1558 Posted March 30, 2016 KK covered the reason why it won't work: Oh ok, sry I didn't catch / understand this :) If the KK code is not working for you, you could try use trigger size and Bis_fnc_Intrigger. [thisTrigger, object] call BIS_fnc_inTrigger // returns true if the object is inside trigger. Ok, I'll try. So, I just need to write this in the condition window of the trigger? "[thisTrigger, DemoCharge_Remote_Ammo] call BIS_fnc_inTrigger" Share this post Link to post Share on other sites
jshock 513 Posted March 30, 2016 [thisTrigger,_x] call BIS_fnc_inTriggerReplace in KK's at: _x inArea thisTrigger Share this post Link to post Share on other sites
davidoss 551 Posted March 30, 2016 [thisTrigger, DemoCharge_Remote_Ammo] call BIS_fnc_inTrigger Not like that. Place trigger 10x10 Type none Activation none in Condition place this code: bomb = nearestObject [thisTrigger, "SatchelCharge_Remote_Ammo"]; bomb2 = nearestObject [thisTrigger, "DemoCharge_Remote_Ammo"]; bombset = false; if (!isNull bomb) then { if ([thisTrigger, bomb] call BIS_fnc_inTrigger) then { bombset = true; }; bombset }; if (!isNull bomb2) then { if ([thisTrigger, bomb2] call BIS_fnc_inTrigger) then { bombset = true; }; bombset }; Clunky but works. PS: [thisTrigger,_x] call BIS_fnc_inTriggerReplace in KK's at: _x inArea thisTrigger That would be best solution i think. Share this post Link to post Share on other sites
Wiki 1558 Posted March 30, 2016 Not like this. Place trigger 10x10 Type none Activation none in Condition place this code: bomb = nearestObject [thisTrigger, "SatchelCharge_Remote_Ammo"]; bomb2 = nearestObject [thisTrigger, "DemoCharge_Remote_Ammo"]; bombset = false; if (!isNull bomb) then { if ([thisTrigger, bomb] call BIS_fnc_inTrigger) then { bombset = true; }; bombset }; if (!isNull bomb2) then { if ([thisTrigger, bomb2] call BIS_fnc_inTrigger) then { bombset = true; }; bombset }; Clunky but works. PS: That would be best solution i think. It does work perfectly!!! Thanks a lot guys!!! I'll be able to do what I want, thanks to you!! Share this post Link to post Share on other sites