Airdrop script (WIP) need a bit of help ...

Halvhjearne

Valued Member!
Ok so a little background story here first ...

I had been modding my admin tools for a while desecrating several hacker tools to extract what i could use (and what would actually work) and i finally got to a point where im kinda happy with where i got to with this ... so time to do more stuff for my players again :)

So i was thinking for a while, what can i actually use some of these mass destruction and spawning wierd stuff for pratically?

well one thing i quickly found out i could use was the click on map to spawn function (thank to whoever made that), wich i was using for a while to just airdrop random cars for unlucky guys or players who lost a vehicle under wierd circumstances (or friends or whatever, many uses for this practically for admins).

this was pretty awsome so i took it even further and and made airdrops of certain ammoboxes and even defined some content aswell, wich was awsome if hackers had been on the server and a lot of players lost stuff.

however, only i and my admins could ofc be using this or it would be abused by the players calling in infinite amounts of carepackages with loot or cars, wich ofc in the end would be even worse than if only 1 hacker was calling it in.

So first thing to add to the final scripts would ofc be a timer, preventing ppl from just calling it in constantly.
i found what i needed in krixes tent sleep script.
Big thanks to krixes, since his code currently makes up for about half my code so far. (hope its ok)
however, this can ofc can be overidden by a quick relog, so if possible i want to change this somehow.
(maby if theres a way to completly prevent a script from running within a certain interval, maybe even blocking and preventing all players from using it, within the cooldown?)

next thing i did was to figure a way for players to call this ...

This is done by adding in "laptop" at the airfields control towers, and when a player is near the laptop, they can click airdrop and do an airdrop.

simple and easy but efficient and it works well.

then i added a timer and some text when activating the laptop, untill the airdrop program is actually loaded and ready to do a drop. (thanks again to krixxes tent heal script)
(still needs a way to abort the script if a player is placed in combat or player moves too far from the laptop)

added three diffrent types of drops Supplys, Random Ammocrate or Random Vehicle.
(needs some work done here aswell)

then i added smoke attached to the drop, so its more visible, where it drops (however this bugged the chuting process a bit and sometimes will dettach the box/vehicle from the chute), i eventually wantet to have it fire flare and smoke as it hits the ground, but for now it just attaches smoke while dropping.

next thing i wantet to do (and this is where im kinda stuck now), i wantet to add some diffrent animations and sounds to the player calling the airdrop, while waiting for the laptop to boot up.

can someone help me figure the right "moves" and "sounds" pls?
i need something that looks like a guy is operating a computer and some simmular sounds like buttons being pushed or computer "beeps" ... idk if just kneeling down will be cool enough, but so far i just threw in some random moves where he looks at his watch and i kinda suck at this and it looks like crap for now.

eventually i wantet to add some kinda items players will need to unluck the drop computer, but for now i just want it to look good and sound propper.

any help or suggestions will be apriciatet on this

anyways it seems the players like this a lot on my test server and as soon as i feel its done i will implement it on the rest of my servers and release it.

to sum it all up for people who might not understand what this does, what can it do for now?

Player walks up to a laptop, player gets option to airdrop, player has to wait for computer to boot (70sec for now, with some blackscreens), when countdown is done player gets 3 drop options to choose from (WeaponsBox, Vehicle or Supplys) and when drop type is selectet the map comes up and the player can click anywhere to call in the drop there, drop will then be parachutet in with red/white smoke attached and a flare fired for better visibility.
this happends again when it lands.

thanks in advance to anyone who can help me :)

Edit to add video:

Edit: 04-11
almost at a point where i feel i can release this, but i need some help with a few minor problems i got tho, or i guess more like im unsure about it ... anyways i added a check for scrap elektronics (as i noticed it was in the new patch and i felt it was fitting) and reduced the timer significantly aswell "only" 70sec now and 300sec cooldown oppesed to the original 120/3000 sec timer, this will ofc also took care of any spamming problem that might turn up if i relied souly on the timer that could be reset by a quick relog.

im currently working how to make the boxes not end up 1-2m under ground after dropping
(fixed)

Edit 10/11
im now at a point where i feel i can release this, i just want to do a few more tests and adjustments just to make sure everything works propper



Regards
Halvhjearne
 
im actually pretty much done with this now and i also made an atillery function and (i havent testet the artillery propper yet tho but as you can see on the video i also got a surveillance option i will include at some point).

this is my "first" real script for arma/dayz, so bear with me if i theres any errors in this ... (as far as i know, it dosnt produce any rpt errors for now tho)

if someone could help me test this propper and maybe help me make a guide for installation ... that would be awsome :) ... pm me and i will send you what i got now, i will post a pastebin of the scripts i made in a few days when i feel it is testet enough

credits goes to all the original scripts i used as refrence to make this ... without awsome script for arma/dayz out there already i would have never been able to make this.


a question tho ... how do i turn the lights on in a vehcle i just spawned in, is there some sort of command for this?
 
T0 turn the lights on a vehicle you have to set a name for it, and then use
Code:
this action ["lightOn", Name]
It only works if the vehicle is empty.

PMing you, as this sounds interesting, and I'm willing to help.
 
should not be a problem ... for now im running this on overwatch, but can be easily modded to run on any mod i guess, if i can just get some info about the box classnames you want them to drop

for now, the random drop is a random weapons crate (also added food/medbox0, to give a "fail" drop randomly, but my players aparently do not apriciate that too much).
the car drop should be pretty versatile, since it loads from config (a bit slow, but it seems to work for now), i might have to add some exceptions tho if some errors pops up, when it spawns cars.

i could have done the same with the random wepons box, however some of the default boxes (in overwatch anyways) has some pretty op loadout, so i limited to certain boxes i choose to use.

none of this should be hard to transfer to any mod tho ...

worst case scenario i guess you just have to define some specific box content to use
 
T0 turn the lights on a vehicle you have to set a name for it, and then use
Code:
this action ["lightOn", Name]

i cant make this work, im not sure im doing it right ... can you show me a better example of this?

Let me know mate, if you need anything fomr me as far as testing..doing anything for you

Bags


if you can define some specific epoch content for one of the boxes that would be pretty awsome ... also if you can come to my raidcall and send me some epoch files ill have a looksee if we can modify it to work for you and others too :)

note that i have not ever played epoch before, but im considdering making an epoch server tho ...
 

awsome thanks

heres what im working on now ... plane (no need for 2 planes to deliver one package) will spawn somewhere else (map center for now) and come to the place you click on the map ... also a possibility to shoot it down and claim the drop from there

this way there will be a chance to loose it aswell as a certain time before the drop is delivered ;)

this will also save me some truble trying to spawn the planes in a certain position, instead of just having them fly there, wich did look a bit stupid anyway when they spawned out of nowhere
 
You realise with the ammo boxes you can clear thier cargo and refill it with whatever you want right?
For example here's a script I wrote.

Code:
_spawn = "MedBox0";
_posplr = [((getPos player) select 0) + 2, ((getPos player) select 1) + 2, 0];
_dirplr = getDir player;
_crate = _spawn createVehicle (_posplr);
_crate setVariable ["Sarge",1,true];
 
clearWeaponCargoGlobal _crate;
clearMagazineCargoGlobal _crate;
 
// Add Drink Items
_crate addMagazineCargoGlobal ["ItemSodaMtngreen", 20];
_crate addMagazineCargoGlobal ["ItemSodaR4z0r", 20];
_crate addMagazineCargoGlobal ["ItemSodaRbull", 20];
_crate addMagazineCargoGlobal ["ItemSodaOrangeSherbet", 20];
_crate addMagazineCargoGlobal ["ItemSodaClays", 20];
_crate addMagazineCargoGlobal ["ItemSodaSmasht", 20];
_crate addMagazineCargoGlobal ["ItemSodaDrwaste", 20];
_crate addMagazineCargoGlobal ["ItemSodaLemonade", 20];
_crate addMagazineCargoGlobal ["ItemSodaLvg", 20];
_crate addMagazineCargoGlobal ["ItemSodaMzly", 20];
_crate addMagazineCargoGlobal ["ItemSodaRabbit", 20];
_crate addMagazineCargoGlobal ["ItemWaterbottleBoiled", 20];
 
// Add Food Items
_crate addMagazineCargoGlobal ["FoodCanFrankBeans", 20];
_crate addMagazineCargoGlobal ["ItemTroutCooked", 20];
_crate addMagazineCargoGlobal ["ItemSeaBassCooked", 20];
_crate addMagazineCargoGlobal ["ItemTunaCooked", 20];
_crate addMagazineCargoGlobal ["FoodBioMeat", 20];
_crate addMagazineCargoGlobal ["FoodmeatCooked", 20];
_crate addMagazineCargoGlobal ["FoodmuttonCooked", 20];
_crate addMagazineCargoGlobal ["FoodchickenCooked", 20];
_crate addMagazineCargoGlobal ["FoodbaconCooked", 20];
_crate addMagazineCargoGlobal ["FoodrabbitCooked", 20];
_crate addMagazineCargoGlobal ["FoodbeefCooked", 20];
_crate addMagazineCargoGlobal ["FoodMRE", 20];
_crate addMagazineCargoGlobal ["FoodPistachio", 20];
_crate addMagazineCargoGlobal ["FoodNutmix", 20];
_crate addMagazineCargoGlobal ["FoodCanGriff", 20];
_crate addMagazineCargoGlobal ["FoodCanBadguy", 20];
_crate addMagazineCargoGlobal ["FoodCanBoneboy", 20];
_crate addMagazineCargoGlobal ["FoodCanCorn", 20];
_crate addMagazineCargoGlobal ["FoodCanCurgon", 20];
_crate addMagazineCargoGlobal ["FoodCanDemon", 20];
_crate addMagazineCargoGlobal ["FoodCanFraggleos", 20];
_crate addMagazineCargoGlobal ["FoodCanHerpy", 20];
_crate addMagazineCargoGlobal ["FoodCanOrlok", 20];
_crate addMagazineCargoGlobal ["FoodCanPowell", 20];
_crate addMagazineCargoGlobal ["FoodCanTylers", 20];
_crate addMagazineCargoGlobal ["FoodPumpkin", 20];
_crate addMagazineCargoGlobal ["FoodSunFlowerSeed", 20];

Those are Epoch specific items but you can use any magazine item. You would use addWeaponCargoGlobal for weapons and toolbelt items.
 
i meant more like building materials ... a lot of what you got there is already in the supply drop

... heres the current content of the supply drop:
PHP:
        {_bam addWeaponCargoGlobal [_x, 1];} forEach ['RH_Deagleg','RH_m1911sd','ItemCompass','FHQ_ACR_WDL_CCO_GL_SD_F','RH_acrbglacog','RH_acrbglaim','ItemFlashlightRed','ItemGPS','ItemKnife','ItemHatchet','ItemMatchbox','ItemEtool','ItemToolbox','ItemCompass'];
        {_bam addmagazineCargoGlobal [_x, 20];} forEach ['30Rnd_556x45_Stanag','30Rnd_556x45_Stanag','FHQ_rem_30Rnd_680x43_ACR_SD','ItemBandage','FoodSteakCooked','ItemSodaPepsi','ItemHeatPack','ItemSodaCoke','ItemWaterbottle','FoodMRE','FoodNutmix','FoodCanUnlabeled','FoodCanRusUnlabeled'];
        {_bam addmagazineCargoGlobal [_x, 10];} forEach ['30Rnd_556x45_Stanag','RH_7Rnd_50_AE','RH_8Rnd_45cal_m1911','ItemSodaMdew','ItemSodaSmasht','ItemSodaLvg','SmokeShellPurple','SmokeShellBlue','SmokeShellOrange','SmokeShell','SmokeShellRed','SmokeShellYellow','SmokeShellGreen','ItemSodaRabbit','ItemTrashToiletpaper','ItemTrashRazor','ItemBookBible','ItemSepsisBandage','ItemAntibacterialWipe','HandChemGreen','HandChemBlue','HandChemRed','TrashJackDaniels','TrashTinCan','HandRoadFlare'];
        {_bam addmagazineCargoGlobal [_x, 5];} forEach ['ItemAntibiotic','ItemWire','PartWoodPile','ItemTankTrap','ItemSandbag'];
        {_bam addmagazineCargoGlobal [_x, 2];} forEach ['ItemTent','ItemCamoNet','PartGlass','PartFueltank','PartWheel','PartEngine','PartGeneric','ItemJerrycan'];
 
From watching your video I like the look of this and the idea of giving players more control over certain things without putting too much balance onto certain types of players.
A few points, from the video, I'd like to make and hope you take them as constructive criticism as I can see you've put a lot of work into this.

The time for the 'laptop' to 'boot' seems excessive. Although I understand the reasoning behind this (protecting the ability to do such a fruitful task) The black screens that come up with the message, is this just while you're in range of the laptop or is it until it boots? It seems like it shouldn't do this, taking the player away from the gameplay could lead to them being killed by a bandit at the wrong time (shooting and suddenly a black screen)
The actions menu looks good and is obviously quite informative.
The actual drop, I think someone else pointed out that 3 planes was excessive, maybe 1 that spawns randomly from the edge of the map, not the centre (to avoid drop camping?) and then it can be shot down and have its cargo stolen from the person who initiated the drop.
Lets be fair, it will be hard to take down a plane that's flying as fast as it looks in the video. but the illusion that they can would be interesting. Also, if this is the case, make it seem more realistic by having the drop take a while to appear. Since you can't expect a plane to be within 30 seconds distance with the supply you requested!

I'm going to keep this in mind and try it on my test server as I'm loving the idea. Would love to see some additions and slight changes though.
Keep up the good work!
 
i might reduce time a little, not much tho ... but ofc anyone with understanding of the code will be able to chage this easily

the rest is pretty much what i am working on now ... center of the map is just temp, i will find a good spot eventually
(aparently center isnt a very good spot to spawn airborne vehicles either as they seem to explode there randomly)
 
this is all done already ... i will need to adjust the timer for the drop and i would love to change the sounds and movements aswell (if anyone knows some cool moves) ... i will update more tomorrow
 
i never went to sleep and the scripts are now (pretty much) done ... a plane/heli (whatever you want to use) comes in with a package and drops it around where you clicked on the map, then takes off (and eventually gets deletet)

if shot down it will drop package right then and there, to enable hijacking of drops
 
i never went to sleep and the scripts are now (pretty much) done ... a plane/heli (whatever you want to use) comes in with a package and drops it around where you clicked on the map, then takes off (and eventually gets deletet)

if shot down it will drop package right then and there, to enable hijacking of drops
You want to post your code to share it? I'm fairly interested.
 
I have a copy running on my server at the moment.

1.0.2.5 Epoch.

I'm using Kostey's Notebook instead though (which can be found in mission crates)
Feel free to join anyone who wants to take a look at it.
 
I was planning on joing till i was randomly globally banned from battleye for no apprent reason, there goes my dayz playing days, damn i was really lookin forward to checking that out.
 
Back
Top