Jump to content
Sign in to follow this  
iconoclastdx

Can I run a script off of a support request module?

Recommended Posts

I'd like to run something after the player requests a supply drop (module) but its not apparent to me how the module can execute a script. I Know I can run something from the modules init box but that runs at the creation of the module, not when it is used. Thanks for the insights!

Share this post


Link to post
Share on other sites

No takers on this one? I know I couldn't have stumped the collective you. There's got to be a way to check if the player called for support. All I want to do is set a task after they use the support module. Am I being obtuse?

Share this post


Link to post
Share on other sites

There is probably a very easy way but as usual it's hard to find due to lack of documentation.

In some of the support modules (virtual I think) there is an init box, you can set a variable there and when you run the module the variable returned would be true

The other option is to look inside the modules you'll need to un pbo them and search for some useful variables.

Share this post


Link to post
Share on other sites

As Sel says some of the modules have inits for when the vehicles (virtual) or crates (supply drop) are spawned on certain providers.

or use the variables the support modules store on the player .... e.g

[ "supportCalled", "onEachFrame",
{
	if ((player getVariable "BIS_SUPP_request") select 0 != "" && count ((player getVariable "BIS_SUPP_request") select 1) == 3 && (player getVariable "BIS_SUPP_selectedProvider") getVariable "BIS_SUPP_supporting") then {
		hint "support called";
		//do what ever here
	};
}
] call BIS_fnc_addStackedEventHandler;

//has a type of support been selected
(player getVariable "BIS_SUPP_request") select 0 != ""

//have valid coordinates been choosen
count ((player getVariable "BIS_SUPP_request") select 1) == 3

//is the choosen provider activated and supporting 
(player getVariable "BIS_SUPP_selectedProvider") getVariable "BIS_SUPP_supporting"

Edited by Larrow
  • Thanks 1

Share this post


Link to post
Share on other sites

Thanks for digging up those three variable Larrow. I'll try to put them to good use. Did you find them in the config viewer? Because I couldn't. The Init wont work for me because runs when the module is created (at the beginning of the mission), not when it is added to a player (w/ synchronizeObjectsAdd) or when the player actually calls the support. Thanks again.

Share this post


Link to post
Share on other sites
Did you find them in the config viewer? Because I couldn't.
No, they were from the "a3\modules_f\supports\fsms\requester.fsm". You will need to upack your arma files and get the BI FSM editor to see this. I had spent alot of time reading through the support modules so i knew roughly where to look so it wasn't any hassle.
The Init wont work for me because runs when the module is created
Aswell as the normal init line for when the module is spawned some of the providers (any virtual and the drop supports) also have init lines you can fill in for when the vehicle or supply crate is spawned. Edited by Larrow

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  

×