Jump to content
dreadedentity

[RELEASE] Helicopter Crash Script / Scripted Heli Flyovers

Recommended Posts

Dread's Heli Crash Script (slash) Random Helicopter Flyovers

Release for Arma 3

Stable in: 1.34.128075 (and probably on)

Version: 1.0 (fully completed unlike my other stuff)

Hey guys!

I just finished writing this script for my first Arma 3 mission, Aftermath. I wanted to share it with you all, because I haven't seen many scripts like this floating around the forum. This script will add randomly-selected, randomly-created helicopters in your mission. They will fly over the player, and even have a chance of exploding, dropping their contents everywhere like a piñata (not quite). Unfortunately, this script is not about focusing on the loot-creation possibilities of helicopter crashes, bfortunately, I have included a small test script I made which randomly creates some boxes around the crashed helicopters, edit away.

To Use:

Using the scripts is simple. Just download them (further down the page) and in your init.sqf put:

[player] execVM "DE_spawnHelicopterFlyover.sqf"

There are 4 other parameters, however, they are optional. Full usage instructions:

/*
USAGE: _handle = [P1, P2, P3, P4, P5] execVM "DE_spawnHelicopterFlyover.sqf";
_handle: Not Required
P1: OBJECT - The object you want the helicopters to fly over.
P2: NUMBER (Optional) - The time (in minutes) in between each helicopter spawn chance.
P3: NUMBER (Optional) - The variation (in minutes) for each spawn chance. For example, with a timer of 10 with a variation of 2, heli chance would be in 8-12 minutes.
P4: NUMBER (Optional) - Chance for a helicopter to fly over each cycle. (0 is never, 1 is always)
P5: NUMBER (Optional) - Chance for a helicopter flying over to suffer from a critial malfunction and crash. (0 is never, 1 is always)

EXAMPLE: 0 = [player] execVM "DE_spawnHelicopterFlyover.sqf";
	Helicopter and shootdown frequency are default values.
   0 = [player, 10, 4, 0.2, 0.6] execVM "DE_spawnHelicopterFlyover.sqf";
	Helicopters will fly around player, every 10 minutes with a variation of 4, 20% chance to spawn each cycle,  60% chance to crash.
*/

Modification:

Be default, only 2 helicopters are in the script. You will need to add the helicopters you want to be spawned yourself by changing the _helicopters array. Add as many as you want, it will not break the script. The format of this array is:

_helicopters = [["helicopter_classname1", amountOfBoxes],["helicopter_classname2", amountOfBoxes],["helicopter_classname3", amountOfBoxes],etc];

One small trick: To increase the chance of a certain helicopter spawning, add it multiple times to the array.

Multiplayer:

No. Sorry. This script was designed for Single Player use in mind, you will have to make some major edits. Well, technically it could work in multiplayer (some parts of it, anyway), but I wouldn't be happy with the result and neither would you, probably.

Known Issues:

At this time, there are no known issues. (finally)

Complimentary Video:





Download (Dropbox)

All persons are free to use and modify these scripts to fit their needs, provided the original credit remains intact or I am credited somewhere in the modified script.

  • Like 1

Share this post


Link to post
Share on other sites

Looks good for those cinematic moments, or to keep players on their toes during a mission :D.

Share this post


Link to post
Share on other sites

This seems really cool, what about non-dynamic ones, scripted and put into like a cinematic moment or something in a SP mission?

Share this post


Link to post
Share on other sites
Guest

Release frontpaged on the Armaholic homepage.

================================================

You are not registered on Armaholic, or at least not that we are aware of. Soon we offer the possibility to authors to maintain their own pages.

If you wish to be able to do this as well please register on Armaholic and let me know about it.

This is not mandatory at all! Only if you wish to control your own content you are welcome to join, otherwise we will continue to follow your work like we have always done ;)

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

Hey nice script so far.

I just had a quick look at it and if you don't mind, here are a few suggestions :

- the parameters "variation" and "flyoverChance" seem a bit redundant.

- I would recommend using "viewDistance" to determine how far away the chopper should spawn "objectViewDistance" would be even better (sadly, there is no such command).

- include another check that removes the chopper when it gets out of range or something. Just relying on him to get to its destination can be unreliable.

- you can also use "setHit" instead of "setDamage" and then randomly damage certain parts of the helicopter, that should add some more variation.

Share this post


Link to post
Share on other sites
Hey nice script so far.

I just had a quick look at it and if you don't mind, here are a few suggestions :

- the parameters "variation" and "flyoverChance" seem a bit redundant.

- I would recommend using "viewDistance" to determine how far away the chopper should spawn "objectViewDistance" would be even better (sadly, there is no such command).

- include another check that removes the chopper when it gets out of range or something. Just relying on him to get to its destination can be unreliable.

- you can also use "setHit" instead of "setDamage" and then randomly damage certain parts of the helicopter, that should add some more variation.

Thanks for the feedback, Tajin.

The first "variation" creates the "range" of time that needs to pass before the loop cycles. "flyoverChance" is the chance for a helicopter spawn in that cycle. The second "variation" has to do with the spawned helicopter's direction, I just couldn't think up a better name for it and that also served as a private test, the helicopters are spawned using a random distance/direction or relative position. The variation is then subtracted from the random direction, to create some variability, I didn't think it would be a nice effect if the helicopters always flew directly overhead of the player.

Maybe we could request such a command on the FT! That sounds like a command I can get behind.

This is true, I'll be looking for a better solution now that it's been brought up.

Actually, rather than having the helicopter randomly just take damage, I was originally envisioning spawning an AA trooper on a nearby hill who would then target the poor heli and fire. But there were some extreme technical difficulties with that (like finding the highest hill in an area), Is there any way I can just simulate a missile firing?

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

×