ziptlytical 6 Posted December 30, 2020 I have placed a claymore down in the editor via empty props, how do i arm them in the init field so they are active at start of mission. Share this post Link to post Share on other sites
pierremgi 4945 Posted December 30, 2020 Claymore charges, placed in editor, are already armed but not "owned". That means you can deactivate them but not touch off them (or set timer). In SP, just add in init field of the claymore: 0 = this spawn {waitUntil {player == player}; player addOwnedMine _this}; Share this post Link to post Share on other sites
ziptlytical 6 Posted December 30, 2020 I mean i want them to be an enemy to the player want them to blow up if player walks into them. Share this post Link to post Share on other sites
pierremgi 4945 Posted December 31, 2020 There is no uncontrolled (automatic) mode for claymores in Arma3. That said, feel free to add a sector on each mines.... detection 20 m , sector +/- 60° from Claymore axis: 0 = this spawn {while {alive _this} do {sleep 2; {if (_x distanceSqr _this < 400 && {[getpos _this, getdir _this, 120, getpos _x] call BIS_fnc_inAngleSector}) then {_this setDamage 1}} forEach allPlayers}}; 4 Share this post Link to post Share on other sites
ziptlytical 6 Posted December 31, 2020 ya i saw there was an addon for claymores but trying to stay clear from addons. Very nice works good. But is there anyway to make them detonate when the player shoots them with bullets? Cuz with this the player has no choice but to walk into them. Share this post Link to post Share on other sites
ZaellixA 384 Posted December 31, 2020 I am not sure it will work but maybe you could try to add an event handler to deal with it like below // Add the "Hit" event handler at initialisation this addEventHandler["Hit", { // Get the unit params["_claymore"]; // Remove this event handler (this most probably is redundant since the object is destroyed!) _unit removeEventHandler["Hit", _thisEventHandler]; // Set the damage _unit setDamage [1, true]; }]; As I said, I am not sure this will work. My (somewhat limited) understanding leads me to the conclusion that it should work, but there's a quite high possibility that I am missing something here. So, please do spend some time testing it before use. @pierremgi may be able to provide some more info on this. Additionally, this should "partially" work in MP. If the claymore is disarmed (by an EOD for example) and then acquired it will change locality. According to event handler's BIKI, the arguments taken should be local, which is valid at the time the event handler is added, but I am not sure it will trigger where the object is not local. This means that if it does not trigger where the object is not local (in other words, it triggers only where the object is local), then by changing locality you loose this functionality. This also needs some testing if you intend to use it in MP. Once more pierremgi might be able to help here 😅. If this is true (the event handler triggers only where the object is local), you could possibly aleviate the problem by adding another event handler to add again the "Hit" event handler like below // Add the "Hit" event handler at initialisation this addEventHandler["Hit", { // Get the unit params["_claymore"]; // Remove this event handler (this most probably is redundant since the object is destroyed!) _unit removeEventHandler["Hit", _thisEventHandler]; // Set the damage _unit setDamage [1, true]; }]; // Add the "Local" event handler to re-add the // "Hit" event handler when locality is changed this addEventHandler["Local", { // Get the parameters params["_claymore", "_isLocal"]; // Check locality if(_isLocal) then { _claymore addEventHandler["Hit", { // Get the unit params["_claymore"]; // Remove this event handler (this most probably is redundant since the object is destroyed!) _unit removeEventHandler["Hit", _thisEventHandler]; // Set the damage _unit setDamage [1, true]; }]; }; }]; As before........... This is untested and you should treat it with caution. Additionally, you should first check whether the "Hit" event handler triggers even if locality is changed and if this is the case, refrain from adding the "Local" event handler as this will (most probably) add multiple "Hit" event handlers (not sure about that, they may get overwritten, but this too needs to be checked 😂 - not sure of how much help I've been with all this "test this" and "test that"...!!!) ruining the intended behaviour. Hope this helps somehow and at least provides some starting point to a possible solution. Share this post Link to post Share on other sites
ziptlytical 6 Posted January 2, 2021 thanks, no go, i moved on from this. 1 Share this post Link to post Share on other sites