Method for getting an IEDs dial code #8323
-
I am currently making a mission in which I want an AI IED spotter to be able to detonate a cellphone IED after seing a player. I am currently using this script to spawn the IED: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Just scanned through the code, and Cellphone connected IEDs are added into an array called This array contains the ied, code and trigger delay: ACE3/addons/explosives/functions/fnc_addCellphoneIED.sqf Lines 47 to 49 in af66a98 So if you have a reference to the IED object, it should just be a simple matter of extracting it from the array: params [["_ied", objNull]];
if (isNull _ied) exitWith {
diag_log "Null object passed to get IED code ....";
-1
};
private _iedIdx = (ace_explosives_CellphoneIEDs findIf {(_x # 0) == _ied});
if (_iedIdx == -1) exitWith {
diag_log "IED not found in Cellphone array ....";
-1
};
private _iedData = (ace_explosives_CellphoneIEDs # _iedIdx);
(_iedData # 1) |
Beta Was this translation helpful? Give feedback.
Just scanned through the code, and Cellphone connected IEDs are added into an array called
ace_explosives_CellphoneIEDs
, which is also broadcasted to all clients.This array contains the ied, code and trigger delay:
ACE3/addons/explosives/functions/fnc_addCellphoneIED.sqf
Lines 47 to 49 in af66a98
So if you have a reference to the IED object, it should just be a simple matter of extracting it from the array: