Thanks, and that problem was solved.
After lots of trying and searching I can't get any return data from the created trigger other than a boolean return though, looking like this:
Error in expression <.sqf"
private ["_unit"];
_unit = _this select 0;
if (_unit hasWeapon "M136") t>
Error position: <select 0;
if (_unit hasWeapon "M136") t>
Error select: Type Bool, expected Array,Config entry
The code it refers to is the following:
private ["_unit"];
_unit = _this select 0;
if (_unit hasWeapon "M136") then {
_unit removeWeapon "M136";
if (_unit hasWeapon "Inko_M136") then {
_unit addMagazine "Inko_M136_Placeholder";
}
else {
_unit addWeapon "Inko_M136";
};
};
_this execVM "inko_real_m136x\scripts\action_m136.sqf";
The script creating the trigger calling the "init_m136.sqf" looks like this:
if (isServer) then {
_trg = createTrigger["EmptyDetector",[0,0,0]];
_trg setTriggerArea[20000,20000,0,true]; // Width, Height, Angle, Rectangle?
_trg setTriggerActivation["ANY","PRESENT",true]; // Activated by, activated how, repeating?
_trg setTriggerStatements["this","this execVM ""inko_real_m136x\scripts\init_m136.sqf"" ",""];
};
Now, what the heck is wrong with this, causing me to only get a boolean return from the trigger rather than an array for the unit triggering it?
Oh, and another thing? Would I need to increase the trigger size to 40000x40000 since I create the trigger in the upper left corner (?) of the map? I'm not quite sure how the trigger is created, but I guess it might expand in both directions for the X and Y axis and not only in one direction?