Jump to content

Helicopter Parachute Supply Drop


tdavison

Recommended Posts

I don't have any issue's with the original script dropping off map on Chernarus. All drops are done in the middle of the map N/E/S/W or a little bit further north or south. none have been any closer than say 5km from the playable edge.

 

See below for the script:

 

/*
	Author: tDavison
	Inspiration: blckeagls / A3EAI / VEMF / IgiLoad
	License: Attribution-NonCommercial-ShareAlike 4.0 International
*/

//Need to calculate if the supply drop was cancelled, based on variable SDROP_SupplyDropFailChance set in init.sqf
if (SDROP_SupplyDropFailChance > 0) then {
	
	_failChance = (floor (random 100) + 1);
	
	if (_failChance <= SDROP_SupplyDropFailChance) exitWith {
		//failed to drop crate - restart timer
		uiSleep SDROP_MissionTimer;
		[] execVM "\SDROP\missions\SDROP_SupplyDrop.sqf";
	};
};

//default helicopter's probability of crashing
_heliWillCrash = false;

//Need to calculate if the helicopter will crash, based on variable SDROP_HelicopterCrashChance set in init.sqf
if (SDROP_HelicopterCrashChance > 0) then {
	_crashChance = (floor (random 100) + 1);
	if (_crashChance <= SDROP_HelicopterCrashChance) then {_heliWillCrash = true};
};

// ALTIS - north, south, east, west starting locations for supply helicopter
// these distances are all oceanic spawns
_posArray = [[72.0000,8184.00,200],[15320.0,7816.00,200],[7528.00,15320.0,200],[6888.00,40.0000,200]];
_mapCenter = [7067.50,7798.63];
_coords = [_mapCenter,500,5000,30,0,10,0] call BIS_fnc_findSafePos;

//random supply helicopter spawn
_heliSpawnPosition = _posArray call bis_fnc_selectrandom;  

//these variables determine a safe location for the supply crate drops
//using the helicopter spawn as starting point
//_coords = [_heliSpawnPosition,0,-1,25,0,25,0] call BIS_fnc_findSafePos;

uiSleep 5;

 

NOTE: This is the top 41 lines of: SDROP_SupplyDrop.sqf

 

Hopefully will resolve some issues for peeps :)

 

Pry

Link to comment
Share on other sites

you can try out my reworked version, what i currently use on chernarus

 

https://github.com/n8m4re/A3Epoch_SupplyDropAddon

 

- all needed configuration stuff  in the "config.cpp" 

- the right map positions will be loaded automaticaly from the config  ( so you can switch the map without editing the .sqf eachtime ) 

( Chernarus, Altis, Bornholm)

 

- fix from the privious page already included

Thanks! Gonna give it a try!

 

EDIT #1 : I must do the following as well ?

// stop server loading the client script
// tutorial: http://killzonekid.com/arma-scripting-tutorials-basic-multiplayer-coding-summary/  
if (isDedicated) exitWith {}; 

// compile the script on mission load
// https://community.bistudio.com/wiki/compileFinal
sdropClient=compileFinal preprocessFileLineNumbers "sdropClient.sqf";

// wait client is ready 
// https://community.bistudio.com/wiki/waitUntil
// https://community.bistudio.com/wiki/isPlayer
// https://community.bistudio.com/wiki/alive
waitUntil{(isPlayer player) && (alive player) && !isNil "EPOCH_loadingScreenDone"};

// Starts running the script
// https://community.bistudio.com/wiki/spawn
[] spawn sdropClient;
Link to comment
Share on other sites

  • 2 weeks later...

In this section, is it possible to add a Text that shows up on the map next to the circle that says something like "Supply Drop"? Would that be something like _marker setMarkerText "Supply Drop"?

Also, where would I find all the variable options to for the setMarkerShape and setMarkerColor. Was thinking about Red but where would one go if they wanted to use "Air Force Blue". Using a hex color code like #00308F does not work.

//create marker at supply crate's landing zone (NOTE: only an approximation of where crate will be, and crate could be slightly outside the LZ)

_marker = createMarker ["SupplyDropMarker", _markerOffset];

_marker setMarkerSize [400,400];

_marker setMarkerBrush "Horizontal";

_marker setMarkerShape "ELLIPSE";

_marker setMarkerColor "ColorCIV";

Link to comment
Share on other sites

In this section, is it possible to add a Text that shows up on the map next to the circle that says something like "Supply Drop"? Would that be something like _marker setMarkerText "Supply Drop"?

Also, where would I find all the variable options to for the setMarkerShape and setMarkerColor. Was thinking about Red but where would one go if they wanted to use "Air Force Blue". Using a hex color code like #00308F does not work.

//create marker at supply crate's landing zone (NOTE: only an approximation of where crate will be, and crate could be slightly outside the LZ)

_marker = createMarker ["SupplyDropMarker", _markerOffset];

_marker setMarkerSize [400,400];

_marker setMarkerBrush "Horizontal";

_marker setMarkerShape "ELLIPSE";

_marker setMarkerColor "ColorCIV";

 yes just add _marker setMarkerText "Supply Drop";

Link to comment
Share on other sites

No go. No text shows up on map.

//create marker at supply crate's landing zone (NOTE: only an approximation of where crate will be, and crate could be slightly outside the LZ)

_marker = createMarker ["SupplyDropMarker", _markerOffset];

_marker setMarkerSize [400,400];

_marker setMarkerBrush "Horizontal";

_marker setMarkerShape "ELLIPSE";

_marker setMarkerText "Supply Drop"; //Added by to see if i could get the words supply drop near the colored circle

_marker setMarkerColor "ColorRed"; // Trying other colors default is ColorCIV

But found this and going to keep trying.

https://community.bistudio.com/wiki/setMarkerTextLocal

Link to comment
Share on other sites

I love this script, I am having one issue though. If a supply drop isn't picked up in a certain time it just goes into limbo. The crate is there however the AI paratroopers are gone. The crate is empty and the helicopter that dropped it off seems to always be hovering nearby.

 

If it's done in time however and all the AI are killed it works fine and starts over again...

Link to comment
Share on other sites

The Helli Dose seem to circle around and fly back over the drop site but then proceeds out to the ocean where it de spawns what I cant seem  to get working is the notification that its spoused to give everyone warning them of the drop so hence no body knows and unless they witness the drop have no idea what it is  all there is is an unnamed purple spot on the map which I've tried to put in text to identify it

_marker setMarkerTextLocal "Supply Drop."; //added to display text

after this line

_marker setMarkerColor "ColorCIV";

is some one able to help me fix these issues please

Link to comment
Share on other sites

you can try out my reworked version, what i currently use on chernarus

 

https://github.com/n8m4re/A3Epoch_SupplyDropAddon

 

- all needed configuration stuff  in the "config.cpp" 

- the right map positions will be loaded automaticaly from the config  ( so you can switch the map without editing the .sqf eachtime ) 

( Chernarus, Altis, Bornholm)

 

- fix from the privious page already included

 

Nightmare, thanks for putting in updated work on this as I really wanted to keep this script going but it was causing me a lot of issues.

 

One thing I am noticing, and I also submitted the issue on Github is this in my server rpt every restart:

 

Warning Message: Script SDROP\init.sqf not found

Link to comment
Share on other sites

Nightmare, thanks for putting in updated work on this as I really wanted to keep this script going but it was causing me a lot of issues.

 

One thing I am noticing, and I also submitted the issue on Github is this in my server rpt every restart:

 

Warning Message: Script SDROP\init.sqf not found

 

 

this is not an error from my version.

your server is try to load an script which does not exist anymore, please check your mission.

 

FOLDER\script.sqf

SDROP\init.sqf not found

Link to comment
Share on other sites

Very cool addon. I'm using it on my server. I do have two requests:

 

1. Percentage chance of it running.

2. Percentage chance that the heli will crash before dropping it's crate, just to make it more interesting.

 

Now, if anyone wants to use it for Chernarus:

 

1. Open SDROP_SupplyDrop.sqf.

2. Replace the "_posArray" line with this:

_posArray = [[72.0000,8184.00,200],[15320.0,7816.00,200],[7528.00,15320.0,200],[6888.00,40.0000,200]];

3. Replace the "_mapCenter" line and the "_coords" line with this:

_mapCenter = [7067.50,7798.63];
_coords = [_mapCenter,500,5000,30,0,10,0] call BIS_fnc_findSafePos;

The _posArray line has positions for helicopters to spawn on the edges of Chernarus. The _mapCenter sets the center of the map at Novy Sobor and _coords sets the distance from the center of the map to spawn the supply drop to 5000km. The edge of the map is around 7.2km from Novy Sobor, so that keeps the supply drops away from the edges of the map.

 

i cant find any of this anywhere, and the miissions are spawning off the map, i changed the _posarray but i cant find _mapcenter or _coords, apart from that its awesome 

Link to comment
Share on other sites

@tdavison (or whoever makes edits to this)
 
 

this might be a cool script, but can you pls clean up your scripts and edit you install instructins to reflect that they are not supposed to add what is in your init.sqf into theirs?

 

i have now more than once told someone that they are not supposed to have this in their actual init.sqf, but rather in a file of its own:

if (!isDedicated) exitWith {};

when someone has this in their init.sqf and someone else tells them to add a line to the bottom of their init (expecting them to not have it inside any if statements), then script nr 2 will for obvius reasons not work anymore ...

 

so pls, add your stuff into its own script and tell people to add a line to their init, rather than having everyone add a big mess into their inits that most likely will make other scripts fail.

Link to comment
Share on other sites

this is not an error from my version.

your server is try to load an script which does not exist anymore, please check your mission.

 

FOLDER\script.sqf

SDROP\init.sqf not found

 

Ya, I had missed pulling the old one out at one spot and that's what was causing it. However, I am having fits if I try to unpack your PBO and repack it. I can unpack it fine, however no matter what tool I repack it with I get:

 

14:37:47 Warning Message: Script x\addons\a3_sdrop\init\fn_init.sqf not found
14:37:47 Warning Message: Script x\addons\a3_sdrop\init\fn_postinit.sqf not found
 
In my RPT file. I have tried PBO view, which says your PBO isn't even a PBO file, I have tried PBO Manager which repacks it but I get that error, and I have tried makepbo.exe which gives me the same results as PBO Manager. And before you ask, I just tried redownloading the whole thing from your GITHUB site, same problem.
Link to comment
Share on other sites

Could someone break down the install for me barney style?

Specifically, where do epoch.Altis initServer.sqf and epochAltis int.sqf exist?  I understand that if I don't have one I'm supposed to just create the file and add that text which is no big deal but I don't what directory (or pbo?) these two files are supposed to live in.

Link to comment
Share on other sites

You need to extract your mission file, they are located inside it or you need to create new ones if none exist. The file is called init.sqf and initserver.sqf within the mission file once you depbo it. There are many different tools you can use to extract a PBO. Mikero's are the most popular and they also decrypt the mission.sqm.

 

Mikero Tools: https://dev.withsix.com/projects/mikero-pbodll/files

 

I am afraid you are dabbling in something that you are going to need to get past barney style though...

Link to comment
Share on other sites

You need to extract your mission file, they are located inside it or you need to create new ones if none exist. The file is called init.sqf and initserver.sqf within the mission file once you depbo it. There are many different tools you can use to extract a PBO. Mikero's are the most popular and they also decrypt the mission.sqm.

 

Mikero Tools: https://dev.withsix.com/projects/mikero-pbodll/files

 

I am afraid you are dabbling in something that you are going to need to get past barney style though...

 

No worries, that was all of the info I needed.  The instructions in the readme didn't specify that those two sqf files are in the mission pbos inside of MPMIssions.

 

Thanks :)

Link to comment
Share on other sites

Hey guys,

 

I want to add a Text to the marker.

Somebody can tell me the right way? I have added "_marker setMarkerText "SupplyDrop";"

Is this OK? Where can I add the Textcolor?

 

//create marker at supply crate's landing zone (NOTE: only an approximation of where crate will be, and crate could be slightly outside the LZ)
_marker = createMarker ["SupplyDropMarker", _markerOffset];
_marker setMarkerSize [500,500];
_marker setMarkerBrush "Horizontal";
_marker setMarkerShape "ELLIPSE";
_marker setMarkerText "SupplyDrop";
_marker setMarkerColor "ColorCIV";
Link to comment
Share on other sites

So, I'm having an issue editing the loadouts for the crates.  I wanted to increase the quantity of food, ammo, and add some ammo types but when I edit the SDROP_functions.sqg I seem to break the crate loadouts.

They all just revert to a single default instead of the four different setups.  Even if I simply increase the quantity of the existing items it breaks the loadouts in this way.

 

Any ideas?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
×
×
  • Create New...