OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Mr.Peanut on 06 Jun 2007, 03:24:56

Title: BoundingBox
Post by: Mr.Peanut on 06 Jun 2007, 03:24:56
BoundingBox. It conjures up images of a vast plain where the boxes roam wild and free.

For some reason the following does not work:
Code: [Select]
_unit = _this select 0;
_bar = nearestObjects[_unit,["STATIC"],20];
for [{_j = 0},{_j < count _bar},{_j = _j + 1}] do
{
   _c = boundingBox (_bar select j);
   hint format ["%1\n%2",(_bar select _j), _c];
   sleep 5;
};

_c comes out as a null array. Any suggestions?   
Title: Re: BoundingBox
Post by: h- on 06 Jun 2007, 18:53:27
You have not spotted it yet?

I'll give you a hint:
Quote
_
;)
Title: Re: BoundingBox
Post by: Mr.Peanut on 06 Jun 2007, 19:07:15
oops, better delete my post in BIS forums before it makes me look even more the idiot....  :shhh:
Title: Re: BoundingBox
Post by: Mandoble on 06 Jun 2007, 19:13:24
LOL
Title: Re: BoundingBox
Post by: h- on 06 Jun 2007, 19:54:06
 :D :D

That happens a lot, especially when you are coding long and complex sets..
Sometimes, although very rarely, a typo causes no immediate visible problems and you only spot when you go over the code not having touched it (the code) in weeks..