Animated/Realistic Helicrashs

I would see it fit to just spawn a helicopter randomly in the sky during a random point in the game, then set it up to around 200-300m with a forward velocity of around 150m/s, giving it enough force and time to plummet to the ground (or into a building), wait for it to settle, then replace the crash with a wreck by initializing a new wreck at the coordinate of the remains.

Ok, since no one here is comming up with any codelines regarding simple AI Chopper-Handling ;), i tried some things...

I get the AI chopper to spawn, and i get an AI Pilot to spawn right next to it... but somehow he doesnt want to go into the chopper and fly it to my designated waypoint...

Code:
        _helipilot = [getPos _crashwreck, WEST, ["Survivor3_DZ"],[],[],[],[],[],180] call BIS_fnc_spawnGroup;
        _helipilot action["moveToDriver", _crashwreck];
        _helipilot assignAsDriver _crashwreck;
        [_helipilot] orderGetIn true;
        _wp1 = _helipilot addWaypoint [_position, 0];

_crashwreck is the spawned chopper right next to the spawned AI Person, _position is the random position where he should fly to. But hes just standing there and looking @ me, he even doesnt start to run to the given waypoint.

Try replacing
[_helipilot] orderGetIn true;​
with
_helipilot moveInDriver _crashwreck​
 
Ok, strange things happen...

So, i get to spawn the chopper in somewhere in the air... together with the AI Pilot sitting in the Pilots-Chair.

What happens is, that if iam not near the chopper when it spawns (chopperpilot has same side as all players, west), the pilot seems to just get into AutoHover and hovers over the spawnpoint... if iam around when the chopper spawns, the pilot is insta starting to the given crashsite-coordinates o_O... tried this a few times... if i wait on the demo-coordinates where the chopper should fly to, he never arrives there, if i port myself to the start-coordinates, he hovers above me forever.

The second problem is that the AI somehow doesnt want to crash choppers ;)... currently i made a waypoint on the crashsite... but the chopper isnt going to land on the position, he is hovering around 100m infront of the waypoint.

Code:
        _wp = _aigroup addWaypoint [_position, 1];
        _wp setWaypointType "GET OUT";
        _wp setWaypointBehaviour "CARELESS";
        _wp setWaypointCompletionRadius 200;
        _wp setWaypointStatements ["true", "_crashwreck flyInHeight -10; _crashwreck setHit ['mala vrtule', 1];_crashwreck land 'GET OUT';"];

So, even when the chopper is 200m around the waypoint he should start to land/crash... but nothing happens :(

Another thing i was thinking about is, instead of using chopper crashs... spawn in a AI-Plane that is dropping cargo-parachutes at the random position.... from the point of realism this would make more sense...
 
Yeah, Problem is that this would take up alot of "free space"... you cant just crash a heli anywhere on the map, if it crashs in a house, i maybe stays in there and the loot that spawns around it maybe cant be grabbed.

On Chernarus this wouldnt be a big problem, it has enough big areas where it is not that important if the heli realy falls on the exact point of the given random coordinates or 10m further. On Namalsk i spawn helicrashs like in the middle of old hospital or sometimes in the middle of vorkuta...best way would be if the heli would fly straight over the point where the crashsite should spawn, then we crash its tailrotor so it starts to spin, and then it should straight go down and explode.... yes, not THAT realistic, but this way would be the savest.

And the thing with the switch to the Huey wreck: i have it already working and you cant realy see the switch because of the smoke and fire... after the heli crashed i wait for a few seconds and then replace the crashed chopper with the wreck... if you REALY look carefully and in the right angle you can see it... but i dont think that this should happen very often ;)
 
The pilot hovering sounds like a trigger problem, not sure if you use those but try creating an appropriate trigger. I can dig up some map editor stuff to help with further information if needed, though you seem like you know what you're doing.

Good project, looking forward in trying this out once it's funcitonal :)
 
The thing i dont understand is why the trigger seems to work when iam around the chopper when it spawns... this makes no sense, everything is done by the server, so there should be no difference if a player is around.

Seems like i have to think about the cargo-drops again until someone has an idea about the helicrashs...
 
I'm not sure about how you do it but in the map editor a trigger has to be activated by something, so I'm guessing it gets activated by the player (you) instead of the vehicle itself?
 
Sounds like the trigger was setr to Bluefor or Opfor Activation. Maybe a Logic is what you need to activate the triggers for both takeoff and crashing.

Would love to see what you have so far and throw some input your way. Keep up the good work.
 
Since i made the pilot civilian its working all the time...

I currently let the heli spawn in 500m, set its fly height to 250m, when its closer then 200m near the crash-point i take out the tailrotor, the heli begins to spin... it looks cool, but the AI pilot doesnt get it to land the thing properly on the exact coordinates without a tailrotor, sometimes he crashes 300m away from its destination... sometimes he doesnt crash at all ;)

Another thing i tried is to just let the heli land, and when its height is under 5 meter i let it explode....it works, but doesnt look realistic... the ai pilot goes into some kind of autohover over the crashsite-point, this looks to "save" for a crash when you see the chopper landing.

Best would be a chopper which hovers over the crashpoint for some seconds, then take out the tailrotor and kill the pilot... i need a straight fall....to the ground to match the crashed chopper with the actual crashsite...

Couldnt find a way to just get a harakiri-pilot that crashes on the given coordinates with 150mph :D
 
Ok guys, i think best would be some testruns on mid/high-populated servers running chernarus, because this map makes animated crashsites "very" easy... on my namalsk-server its quite hard... to many big mountains, only a few wide open fields... to much altitude.

I would put like 100 or maybe 200 custom spawnlocations into the script... they would all be on random open fields... the choppers will start south of elektro and cherno, flying over the cities to theire crash location, and when they are closer then X to the destination i simply kill the pilot and remove the fuel, gonna have to test this tomorrow.

Anyone who wants to get my script to test on theire servers: Please PM me.
 
Ok guys, i think best would be some testruns on mid/high-populated servers running chernarus, because this map makes animated crashsites "very" easy... on my namalsk-server its quite hard... to many big mountains, only a few wide open fields... to much altitude.

I would put like 100 or maybe 200 custom spawnlocations into the script... they would all be on random open fields... the choppers will start south of elektro and cherno, flying over the cities to theire crash location, and when they are closer then X to the destination i simply kill the pilot and remove the fuel, gonna have to test this tomorrow.

Anyone who wants to get my script to test on theire servers: Please PM me.
I hate Chernarus (Needs blowouts + bloodsuckers.. ;)) but this sounds really awesome. You need to post a video bad. XD
 
If only our server HAD a population. Since all the various arma mods came out, our population has dwindled to... well... Me and 2 other guys that play here and there, but mostly use it for developement.
 
If only our server HAD a population. Since all the various arma mods came out, our population has dwindled to... well... Me and 2 other guys that play here and there, but mostly use it for developement.
I had 12 on my Namalsk server, but that was as high as I could go without utterly crashing my junk internet connection; DSL runs along cans and string to my mountain fortress. :D
 
I hate Chernarus (Needs blowouts + bloodsuckers.. ;)) but this sounds really awesome. You need to post a video bad. XD
Namalsk is my favorite map, but i gues for maps like this... cargodrops would be better... they could fly realy high and drop some weapon-crates bound to a parachute on there way.
 
I'm more than willing to test on Celle if you're willing. Pop between 10-40... Nice having a good amount of European players as well as NA players, keeps it active most hours of the day or night.

If you need to me to make waypoints or crash markers, I'd gladly do it. Just give me an example of what's required.
 
Celle would also (if not even better) work, nearly no hills and only small citys here and there... i would set the startpoint for the heli somewhere near celle so you can see the direction where the heli is flying to.

I will have to work with some variables now...forcespeed, flyheight of the helli, and then i have to work out how far of the waypoint i have to crash the engine so the heli goes down as near as possible at the given coordinates. So yes, you can start to create an array of static-crashsite coordinates, for now they shouldnt be that near any citys and like 100m away from the next forrest... i mean, you could try, we will have to see what happens ;) Iam sure this will create some epic moments anyways :D

Array would have to look like this:

_staticcrashs = [[12345.12,5643.11], [98761.11,7848.11], [12345.12,5643.11]];

So you need only 2 dimensions, no height of the waypoint.

All you guys who wrote me a pm, i will send you the url to the modded crashsite.sqf once i have the variables and coordinates for chernarus.
 
How many would you like me to create? And if I did say.. want the heli crash to explode in some trees or buildings and spawn the crash site on that spot... that'd work too? - I honestly don't care if people can't always get at all the loot... Shit happens, gear is lost in the wreckage IMO.
 
In this case... you dont realy need to build a static array of crashsite-points... i actually give it a try on chernarus with the build in BIS_fnc_findSafePos Function, for Maps like Celle or Chernarus it should be enough if the Heli Crashes somewhere around the Position...

Currently i must somehow get rid of the AirDestruction-Rocks that apear around a crashsite... because they block the loot.
 
Ok, it works on Chernarus... the heli comes in with 160mph in 92 meters, rotor stops 300m before the crashpoint, heli crashes somewhere around 40m of the random spot generated by the script. Flighttime is about 4-5 minutes... it would also be possible to give the heli another random waypoint around the map, so if you see the heli you do not know if the direction its flying will be the direction of the crash.

The last problem i have are these rocks that are generated by the chopper-crash. The loot spawns inside these rocks and cant be looted... yes, i could spawn the crashsite some meters away from the crashed chopper, but this wouldnt look realistic.

If someone could help me with this i could publish the script.
 
Back
Top