_x Am I stupid?

Krenuds

New Member
Anyone know what the _x variable in arma 2 is? I see it everywhere as local but never declared. I don't think it's even initialized but rater used as a command it seems.

Like, in this case it seems it's gathering the items in an array...

Code:
_pos = getPos _x;
_xpos = _pos select 0;
_ypos = _pos select 1;

And then pulling a directory...

Code:
_dir = getDir _x;

Can someone shine some light on this?
 
_x is the generic variable that gets created on loops
_thinginlist = ["Hi","hi again"];
{hint _x;} forEach _thinginlist;

forEach will loop though each array object in _thislist objecct 0 is "hi" object 1 is "hi again";

the first time it loops you will see hi the second time you will see hi again.

_x is passed down to the loop from what ever its looping.
 
Back
Top