Jump to content
jakkob4682

trying to make a script that parses all Logics placed in the editor

Recommended Posts

not what to use as the forEach command as there are also modules places in the editor. Also how do I filter out the modules?

_array = [];
{
	_count = 0;
	if(_x isKindOf "Logic")then
	{
		_array pushBack _x;
		_idx = _array select _idx;
		_pos = getPosASL _idx;
		_count = _count + 1;
	};
}forEach _whatDoIputHere?

 

Share this post


Link to post
Share on other sites
_array = ( allMissionObjects "Logic" select{ !( _x isKindOf "Module_F" ) } ) - [ BIS_functions_mainscope ];
_numLogics = count _array;

Maybe other logics you need to remove, e.g any created by ambient anims.

  • Like 1

Share this post


Link to post
Share on other sites

thank god..... was pounding my head on this.  I  knew I was overlooking something simple.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×