Hi, am hoping some scripting guru can help me out here or point out why I am doing this the wrong way.
I am looping through houses within a distance with
Within that I am <doing stuff> and want to call another function and pass the current house object to that function so I can reference that object (house) directly, with:
The only problem is when into the function (animate_lights_off.sqf), if I, essentially, hint this select 0; I get the word any returned and not the usual array of info. from the house..?
I have tried all sorts of permutations with no result. I have considered looking for the house again once in the new function but can not guarantee I have the exact same house.
I must be missing something obvious here as no amount of Googling is helping..
I am looping through houses within a distance with
Code:
_objHouse = nearestObjects [player, ["House"], 100];
{
} forEach _objHouse;
Code:
_x execVM "scripts\animate_lights_off.sqf";
The only problem is when into the function (animate_lights_off.sqf), if I, essentially, hint this select 0; I get the word any returned and not the usual array of info. from the house..?
I have tried all sorts of permutations with no result. I have considered looking for the house again once in the new function but can not guarantee I have the exact same house.
I must be missing something obvious here as no amount of Googling is helping..