I'm testing a couple of methods for fire propagation, I got one method sort of working but it's pretty flaky. However, for this test I'm trying to maintain an array of all destroyed trees in the mission, and using that to check if the current tree is to be burned.
But, I cannot work out why the code inside the loop will not execute:
if (!(_objID in JTD_FireTrees)) then
{
hint "JTD_FireTrees loop";
nul = [_x] execVM "ForestFireTree.sqf";
JTD_FireTrees = JTD_FireTrees + [_objID];
sleep 5;
};
?
_x being the tree currently being tested. The loop works with the other method (testing for proximity of a custom object) and I'm not getting errors in the rpt. _objID definitely exists, 'cos I hint it just before the loop. JTD_FireTrees is initialised in the config like this:
JTD_FireTrees[] = {};
and yet the loop never executes. I never see the inner hint.
JTD_FireTrees is an array that all destroyed trees will go in, and objID is the ID number of the currently tested tree.