Jump to content
-JpS-RaptorMan

macro's in cfg config files?

Recommended Posts

I was reading on https://community.bohemia.net/wiki/PreProcessor_Commands#EXEC about their stuff - it's pretty short - what sorts of things have people done with macros in general?

Specifically eval / exec?

Only close hit was debugging output removed / added via macro
 

Quote

 

site:bohemia.net macros cfg config file
 

site:bohemia.net macros cfg config file exec

 

 

Share this post


Link to post
Share on other sites

As a UI creator I sometimes use it to keep track of my y position on dialogs, see here: https://github.com/7erra/-Terra-s-Editing-Extensions/blob/master/TER_editing/gui/RscDebug.hpp. Basically this workflow:

//--- Init _curY
__EXEC(_curY = 0)
class Control1
{
	...
    //--- Use it to get the current y position
	y = _curY * GRID_HEIGHT;
	...
};
//--- Next control should be on grid lower, so add one to _curY
__EXEC(_curY = _curY + 1)
class Control2
{
	...
	y = _curY * GRID_HEIGHT;
};

So in simple terms, it let's you use really basic sqf commands in configs. They are very finicky to handle though.

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

×