Jump to content
Sign in to follow this  
mr.g-c

Mission Params for Modules Condition of Presence

Recommended Posts

Hi, im having a hard time making modules only to load when certain mission Paramters are selected.

So far im having just entered the following into the "condition of presence" field of a module:

ParamName==0

But this does not work. I use the same simple statement for scripting however and it does work. What should i alter to make it work with modules from inside the editor or mission.sqm?

While "ParamName" is the Name of a parameter where a selection uses either 0 or 1. Example of my description.ext:

class Params
{
	class ParamName
    {
            title = "Parameter Whatever";
            values[] = {0, 1};
            texts[] = {"Whaterver 1 is selected", "Whatever 2 is selected"};
            default = 0;
    };
};

Share this post


Link to post
Share on other sites

To find out if ParamName is 0 you need to use paramsArray

(paramsArray select 0) == 0;

I suggest you to read this side.

  • Like 1

Share this post


Link to post
Share on other sites

Works. Thank alot. Interesting why the simple expression works for scripts but not for modules. I also tried it with Variables that i set in init.sqf with "BIS_fnc_getParamValue" but i guess since modules are initialized before the init.sqf or other init files, that i did not worked. Thanks alot R3vo for your help. :-)

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
Sign in to follow this  

×