Jump to content
Sign in to follow this  
bismember

Configure and activate Simple Support Module on trigger

Recommended Posts

Hi guys. Trying to configure and manipulate Simple SUpport Module, UnitsDrop support.

QUESTIONS

1) Predefine UnitsDrop squad members and limit this support to only one call available.

2) Activate UnitsDrop support option when the player is in the trigger area and deactivate it when player is not in the area

MY SEARCH

Till now I found the way to enable/disable this support by default. I found 3 ways:

1) BIS_SSM_UnitsDrop_AVAILABLE_WEST = true

2) missionNamespace setVariable ["BIS_SSM_UnitsDrop_AVAILABLE_WEST", true]

3) ["BIS_SSM_UnitsDrop_AVAILABLE_WEST", true] call BIS_SSM_fnc_InitVariable

What's the difference and which one and where should I use?

I can't change anything in the game with triggers.

I don't know what and where to write to make all this work. There are different separate instructions without explanation what exactly and where exactly should I write. I didn't find an exact example how to change the list of soldiers in this support etc.

I have searched a lot.

Share this post


Link to post
Share on other sites

I'm not very good with modules but this may help a little.

in the SSM init put

BIS_SSM_AmmoDrop_ENABLED_WEST  = false;
BIS_SSM_UnitsDrop_ENABLED_WEST = false;
BIS_SSM_Airstrike_ENABLED_WEST = false;
BIS_SSM_Mortar_ENABLED_WEST    = false;
BIS_SSM_Artillery_ENABLED_WEST = false;
BIS_SSM_CeaseFire_ENABLED_WEST = false;   

IN the trigger on act

BIS_SSM_UnitsDrop_ENABLED_WEST=true;
[] call BIS_SSM_fnc_updateMenu;
 BIS_SSM_UnitsDrop_EXPRESSION = { 
   BIS_SSM_UnitsDrop_ENABLED_WEST = FALSE; 
     BIS_SSM_UnitsDrop_AVAILABLE_WEST = FALSE;
        call BIS_SSM_fnc_updateMenu;  };

I don't know how to select the units, nothing I tried worked.

Share this post


Link to post
Share on other sites

As far as predefining unit drop members, the following is commented at the beginning of the SSM init:

// Example, add this to the init of your player. That will override the default spawning groups. 
// this setvariable ["BIS_SSM_UnitRequestConfigArray",[["Custom Squad",0.5,["USMC_Soldier_SL","USMC_Soldier_TL","USMC_Soldier_AR","USMC_Soldier_LAT"]]]];

So the custom squad define would go in a player unit's init field.

Share this post


Link to post
Share on other sites

Yes, I saw this thing but thought there was something more specific for the module itself.

---------- Post added at 03:08 ---------- Previous post was at 02:51 ----------

I'm not very good with modules but this may help...

This works. Thanks. But there are more issues. For instance, reinforcements come from random direction and get shot by enemy AA. Also I don't how to limit player to have only one call available. I should probably use a custom ai squad in a vehicle to wait somewhere for player request instead of using this module, lol.

Share this post


Link to post
Share on other sites
Yes, I saw this thing but thought there was something more specific for the module itself.

Not that I'm aware of. When the aircraft reaches the drop waypoint, the module queries the caller's "BIS_SSM_UnitRequestConfigArray" variable, and starts pulling units from the array until BIS_SSM_MAXGROUPSIZE is reached for the caller's group. When max group size is reached, noone else drops.

But BIS_SSM_MAXGROUPSIZE is default 10. It can be adjusted in the module init.

reinforcements come from random direction and get shot by enemy AA.

You can set where the aircraft flies in from and where it flies out to. The variables you want to set are BIS_SSM_UnitsDrop_FLYINPOSITION and BIS_SSM_UnitsDrop_FLYOUTPOSITION. Both use position arrays. You can use a marker's position to define them. It's where the aircraft will spawn in and out.

Also I don't how to limit player to have only one call available.

The trigger F2k Sel posted above should take care of the one-time call. It enables the call, and sets an EXPRESSION code which runs when the drop is called. The code sets ENABLED back to false, disabling further calls.

If the EXPRESSION isn't working from the trigger, move that particular part to the SSM and try it there.

Till now I found the way to enable/disable this support by default. I found 3 ways:

1) BIS_SSM_UnitsDrop_AVAILABLE_WEST = true

2) missionNamespace setVariable ["BIS_SSM_UnitsDrop_AVAILABLE_WEST", true]

3) ["BIS_SSM_UnitsDrop_AVAILABLE_WEST", true] call BIS_SSM_fnc_InitVariable

What's the difference and which one and where should I use?

My understanding:

1) and 2) are just two ways of doing the exact same thing. Global variables declared using '=' are stored to missionNamespace same as if 'setVariable' had been used. You can do either one, wherever you want.

3) uses an SSM function and is for a specific purpose: to initialize a variable for the SSM with a default value - and if the variable is found already defined, it won't be redefined; but if not found (nil), it will be initialized with the given value.

- SSM uses it to ensure custom values already assigned don't get overwritten when the defaults initialize.

- A mission maker might use it to ensure they don't inadvertently overwrite an existing variable the SSM is already using.

The main thing to keep in mind is that it will not set the value if the variable is already defined.

Also if the function is called before SSM initializes, an error occurs (SSM defines the function). Something to keep in mind with Order of Initialization.

https://community.bistudio.com/wiki/6thSense.eu:EG#Order_of_Initialization

Share this post


Link to post
Share on other sites
Not that I'm aware of...

Your answer made more things clear. I'm gonna try it. I didn't know F2k's code above included the limitation I asked for because I used only a part of the code.

Thanks for explanation.

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  

×