Jump to content
Sign in to follow this  
nettrucker

Chopper drops ammobox supplies in a cutscene

Recommended Posts

hello there

I need some help of my fellow community members because I'm at wits end here. I need to set up an intro where a helo does an ammo supply drop for the ground troops. If it were in mission I would just drop the SSM module and call it in. Problem is I need it for a cutscene. I've searched around but couldn't come up with any results concerning my problem. My scripting ability is like non existent otherwise I wouldn't ask for help which is very much appreciated.

Thanks in advance to anyone who can find a solution.

Share this post


Link to post
Share on other sites

You can put a functions module down, and put this code into your scene script at the point you want the helicopter to drop the load:

waitUntil { !isNil "BIS_fnc_supplydrop" };
[helo, "land"] call BIS_fnc_supplydrop;
sleep (0.5 + random 0.3);
[helo, "reammobox"] call BIS_fnc_supplydrop;
sleep (0.3 + random 0.1);
[helo, "reammobox"] call BIS_fnc_supplydrop;

"land" creates a HMMWV_M2, feel free to remove it.

Of course rename 'helo' to whatever you called your helicopter.

Also, the helo needs to be at least 200m for this to really work. You can put this into the init line of the helo:

this setPosATL[(position this select 0),(position this select 1),200]; this flyInHeight 200

Final note, the supply system scripts are full of little bugs. BIS_fnc_supplydrop will throw an error that "_para" is undefined because it tries to log that variable before it is ever created. You will only see it if showScriptErrors is turned on.

Share this post


Link to post
Share on other sites
You can put a functions module down, and put this code into your scene script at the point you want the helicopter to drop the load:

waitUntil { !isNil "BIS_fnc_supplydrop" };
[helo, "land"] call BIS_fnc_supplydrop;
sleep (0.5 + random 0.3);
[helo, "reammobox"] call BIS_fnc_supplydrop;
sleep (0.3 + random 0.1);
[helo, "reammobox"] call BIS_fnc_supplydrop;

"land" creates a HMMWV_M2, feel free to remove it.

Of course rename 'helo' to whatever you called your helicopter.

Also, the helo needs to be at least 200m for this to really work. You can put this into the init line of the helo:

this setPosATL[(position this select 0),(position this select 1),200]; this flyInHeight 200

Final note, the supply system scripts are full of little bugs. BIS_fnc_supplydrop will throw an error that "_para" is undefined because it tries to log that variable before it is ever created. You will only see it if showScriptErrors is turned on.

Thanks AZCpder

gonna try that when back home this evening. Thanks for the code and your help which is very much appreciated.

cheers

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  

×