Jump to content

Helicopter Parachute Supply Drop


tdavison

Recommended Posts

I have a request. I have an animation script where my guy uses his walkie talkie.

 

Is there a way for a player to have a chance of triggering a supply drop within a certain distance?

 

Great script BTW  :wub:

 

I wouldn't know how to do this - haven't seen any animations for using radio... are you attempting to do this client-side or server-side? (the add-on was meant for server-side). If you have code that triggers the animation, I am sure you could find a way to make it work within that framework (like not call the script from initServer, rather call it from the radio animation).

Link to comment
Share on other sites

I wouldn't know how to do this - haven't seen any animations for using radio... are you attempting to do this client-side or server-side? (the add-on was meant for server-side). If you have code that triggers the animation, I am sure you could find a way to make it work within that framework (like not call the script from initServer, rather call it from the radio animation).

 

If you go into editor, click preview, then press escape and click ANIMATIONS, you can see a wide variety of animations and loops.

 

My questions is batter asked this way...

 

Is there a function or execVM a player can call to trigger the helicopter script? 

Link to comment
Share on other sites

If you go into editor, click preview, then press escape and click ANIMATIONS, you can see a wide variety of animations and loops.

 

My questions is batter asked this way...

 

Is there a function or execVM a player can call to trigger the helicopter script? 

 

I honestly don't know if a script can be triggered by a player using a radio - I'm pretty sure that animation is driven on the client-side of things. Very sorry.

Link to comment
Share on other sites

Just a little heads up:

Let BIS_fnc_findSafePos search in a 8000m radius by the server is insane and will produce a heavy delay on other scripts and probably many yellow chains on well populated servers!

Keep a look into my fn_findMissionPos.sqf to see how I create a random position on the Map and then use BIS_fnc_findSafePos in a much lower radius, to search a valid position.

You are free to adapt this script (or take parts out of it) and use it for your supply drop mission.

But keep in mind that my fn_findMissionPos script is dependent on the results/calculations, made by the fn_getWorldData.sqf, which dynamically creates a center and a maximum search radius for every map.

Greez KiloSwiss

Link to comment
Share on other sites

I can confirm Kilo's above comment.

 

We have installed the Airdrops and noticed 20+ players on the serer you get the notification that a chopper has been seen. Then when it drops its load notification comes up server wide yellow chain and some FPS drop.

 

Also noticed the following:

 

Mohawk x 3 hover above 3 locations - West, South & East. Just sit there, shoot them down another appears - Player base freaks out and starts shooting or complain.

 

After a few drops the notification happens as normal then no marker and no box. Check the logs to find that 4 x boxes are reported as being dropped, check admin markers and found 4 parachutes - no boxes.

The missions then cease to work until server restart.

Link to comment
Share on other sites

Just a little heads up:

Let BIS_fnc_findSafePos search in a 8000m radius by the server is insane and will produce a heavy delay on other scripts and probably many yellow chains on well populated servers!

Keep a look into my fn_findMissionPos.sqf to see how I create a random position on the Map and then use BIS_fnc_findSafePos in a much lower radius, to search a valid position.

You are free to adapt this script (or take parts out of it) and use it for your supply drop mission.

But keep in mind that my fn_findMissionPos script is dependent on the results/calculations, made by the fn_getWorldData.sqf, which dynamically creates a center and a maximum search radius for every map.

Greez KiloSwiss

 

KiloSwiss: Do you happen to have any references or pages that reference performance issues with BIS_fnc_findSafePos? From what I can tell, it simply returns a coordinate that meets the parameters set in the array.

 

According to Lost_Noob - he gets the yellow link when the helicopter drops the crate, which makes no sense at all to me - because BIS_fnc_findSafePos was called way prior to that... the helicopter is simply dropping the crate and attaching to a parachute. I will add deleteVehicle _chute; after the crate has landed.

 

Ahh - this is most likely the issue causing the yellow link:

while {(getPosATL _crate) select 2 > _chuteMinDistanceToOpen} do
{
	sleep 0.2;
};

I'll have to find a better way to handle that one... but will most likely just remove the _chutMinDistanceToOpen variable. Which really means the parachute will most likely fall outside the LZ.

Link to comment
Share on other sites

Sorry do not understand a thing for installation this.

Installation:

Extract it to your Desktop or somewhere where you won't lose it. Inside the Zip is this Readme.MD, and the folder "SupplyDrop-1.0". Inside you will find SDROP.pbo and the "SDrop" folder with mission and script files.

1. Edit your epoch.Altis initServer.sqf (or add one)
Paste in the following line (or add to existing IF SERVER condition):

if (isServer) then {
[] ExecVM "\SDROP\init.sqf";
};

2. Edit your epoch.Altis init.sqf (or add one)
Paste in the following - this is used for sending messages to all players:

//Supply Drop Alert Event
"SDROP_Alert" addPublicVariableEventHandler {
hint parseText format["%1", _this select 1];
};

Should I add this strings to init.sqf in epoch.Altis.pbo in \MPMissions on server or what?

Link to comment
Share on other sites

Sorry do not understand a thing for installation this.

Installation:

Extract it to your Desktop or somewhere where you won't lose it. Inside the Zip is this Readme.MD, and the folder "SupplyDrop-1.0". Inside you will find SDROP.pbo and the "SDrop" folder with mission and script files.

1. Edit your epoch.Altis initServer.sqf (or add one)
Paste in the following line (or add to existing IF SERVER condition):

if (isServer) then {
[] ExecVM "\SDROP\init.sqf";
};

2. Edit your epoch.Altis init.sqf (or add one)
Paste in the following - this is used for sending messages to all players:

//Supply Drop Alert Event
"SDROP_Alert" addPublicVariableEventHandler {
hint parseText format["%1", _this select 1];
};

Should I add this strings to init.sqf in epoch.Altis.pbo in \MPMissions on server or what?

 

You should be able to put that in your epoch.Altis.pbo (unpacked) init.sqf

Link to comment
Share on other sites

Is that really big (about 1000*1000m) purple radius on map is this mission?

 

The marker is 500 meters x 500 meters - you can change it, but the crate might not be within a smaller radius. I'll be doing a hotfix for this in just a little while. The hotfix includes some performance issues as well as putting the marker where the crate is (with a slight offset).  After the hotifx, you can change the radius to be smaller - but I'd suggest at least 300 meter radius, unless you want to use the exact position marker.

Link to comment
Share on other sites

how can I start this script only, if >10 Players are on the server?

 

I haven't tested this, but I think you can do something like:

if (isServer) then {
     if (count playableUnits > 10) then {
          //call mission
          [] ExecVM "\SDROP\init.sqf";
     };
};

Again, not tested. Sorry if any errors - you also want to make sure any other "isServer" calls are not in the IF condition to check players.

Link to comment
Share on other sites

Version 1.0b has been released on my github page: https://github.com/tdavison70/Helicopter-Supply-Drop/releases

 

This should fix helicopters that cannot find a safe position from hovering aimlessly. Some other performance-related fixes (using logic for drop height) were made, which should fix any yellow link icons from happening. 

 

Thanks again for all of your testing & suggestions. Hopefully this add-on will run better than before.

Link to comment
Share on other sites

Version 1.0b has been released on my github page: https://github.com/tdavison70/Helicopter-Supply-Drop/releases

 

This should fix helicopters that cannot find a safe position from hovering aimlessly. Some other performance-related fixes (using logic for drop height) were made, which should fix any yellow link icons from happening. 

 

Thanks again for all of your testing & suggestions. Hopefully this add-on will run better than before.

Great work man!

Link to comment
Share on other sites

I honestly don't know if a script can be triggered by a player using a radio - I'm pretty sure that animation is driven on the client-side of things. Very sorry.

 

Here's a script where the guy has player using a radio animation and he says in his video that he will soon have that cause an action:

 

 

Maybe he can help you with that if it's something you want to use.

Link to comment
Share on other sites

Here's a script where the guy has player using a radio animation and he says in his video that he will soon have that cause an action:

 

 

Maybe he can help you with that if it's something you want to use.

 

LMAO! That's a nice script  :ph34r: (that's my script... i just need a good execVM to call with it)

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...