Jump to content
Sign in to follow this  
mandoble

Mando Heliroute ArmA

Recommended Posts

Just in case you need long range chopper trips and accurate landings anywhere whitout using any invisible or visible helipads.

What problems does solve the script?

- If you give a destination really far away, ArmA engine stalls trying to solve the path and the chooper will refuse to move.

- If you order a chopper to land at destination, it will land anywhere except where you want it to land, much less on building roofs or between streets.

<span style='color:blue'>Mando Heliroute ArmA v1.2 at OFPEC</span>

Changes in v1.2:

- The chopper will stay where indicated even after assigning soldiers to it as cargo. The chopper will not try to move to pick them up and will stay in its current position waiting for the cargo.

- The script now stores the route states into an internal vehicle variable name mando_heliroute with the following possible values: "busy" (the chopper is executing the route), "damaged" (chopper damaged or pilot dead, the route is finished) and "waiting" (the route is finished and the chopper is ready for new routes).

- Added more instructions to the script header.

Share this post


Link to post
Share on other sites

Awesome !

A fine step towards making this game less frustrating and more enjoyable and immersive yay.gif

Share this post


Link to post
Share on other sites

thumbs-up.gif for you Mandoble!

IMO it should be fixed in ArmA by default. This helps much in my (currently halted) work.

Many thanks smile_o.gif

Share this post


Link to post
Share on other sites

I remember your Mission for OFP called The Forrest. At that mission i've seen you are a good scripter...but the last time i must say, you're now one of the best scripter thumbs-up.gif

Thanks for your work, Mandoble xmas_o.gif

Share this post


Link to post
Share on other sites

Thank you again! Will test this with an Mi-17.

Next i guess you make some kind of low level flight/strike below 20m??

Share this post


Link to post
Share on other sites

Beautiful work as usual Mandoble, works great in MP too yay.gif

Now if only we could somehow get fast roping in the game *hint hint*

Share this post


Link to post
Share on other sites

Hi Mandoble, i tested the script and is very nice, i'd make some suggestions for a next version though, for example , maybe adding a new variable to the script, instead of turning off the engine after landing, i would let it on and i would add the option exit = false/true ( true = engine shut off and pilot exit , false = engine turned on and pilot in the choper) that would fit for choper insertions in enemy territory . Also it would be great if the landing speed could be increased a bit to add more agility to the insertion.

regards thumbs-up.gif

Share this post


Link to post
Share on other sites

Very nice indeed !

As Kutya, this helps a lot for dynamic/pseudo dynamic missions, where insertions can take place quite a long leap away wink_o.gif

I hope this gets included with many missions ! It sure is in my own tounge2.gif

Malick

Share this post


Link to post
Share on other sites

William, I'll (try to) incorporate the "almost landing" option (hovering 1m above ground with engine running) for fast insertions or/and fast loads as soon as I return from a trip to Italy.

Share this post


Link to post
Share on other sites

Is there perhaps a way to make this work for a shuttle system? I need the helicopter to start in the air, fly/land to the pickup/ spawn area. wait 60 seconds, take off, fly to the landing zone wait 60 seconds, then fly back to the pickup/spawn location and repeat, having the helicopter repeat that the whole duration of the map. If thats possible, any help would be great. help.gif

Share this post


Link to post
Share on other sites
William, I'll (try to) incorporate the "almost landing" option (hovering 1m above ground with engine running) for fast insertions or/and fast loads as soon as I return from a trip to Italy.

There isn't a big enough -> yay.gif for that news!

Share this post


Link to post
Share on other sites

tnashem, just an example of init.sqf to do what you want to do (lets say the chopper is named heli1):

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

// init.sqf

if (isServer) then

{

while {alive heli1} do

{

_scr = [heli1,[getMarkerPos "mk_dest1"],50, true] execVM"mando_heliroute_arma.sqf";

waitUntil {scriptDone _scr};

Sleep 60;

_scr = [heli1,[getMarkerPos "mk_dest2"],50, true] execVM"mando_heliroute_arma.sqf";

waitUntil {scriptDone _scr};

Sleep 60;

};

};

heli1 will move to marker mk_dest1, will land there and will wait 60 secs, then will move to marker mk_dest2, will land and will wait 60 secs, then again to mk_dest1 and so on...

McGhee, this is a script so you dont need any instalation, just copy the script to your mission folder and use it as indicated in its header.

Share this post


Link to post
Share on other sites
Quote[/b] ][chopper, route positions array, flying height, landing true/fasle] exec"mando_heliroute_arma.sqf

what is route positions array and where do i put this in the mission editor. and also what is the difference between true and false landing.

Im sure this is a great script if I was good enough to use it. Thank you.

Share this post


Link to post
Share on other sites

pos array is the array of positions for the route

[getMarkerPos "mk1", getMarkerPos "mk2"] for example for a two waypoint route.

landing true/false, true means that chopper will land at the end of the route or not.

Share this post


Link to post
Share on other sites

Updated to v1.2

- The chopper will stay where indicated even after assigning soldiers to it as cargo. The chopper will not try to move to pick them up and will stay in its current position waiting for the cargo.

- The script now stores the route states into an internal vehicle variable name mando_heliroute with the following possible values: "busy" (the chopper is executing the route), "damaged" (chopper damaged or pilot dead, the route is finished) and "waiting" (the route is finished and the chopper is ready for new routes).

- Added more instructions to the script header.

Note about "fast insertions".

The chopper now moves faster to destination when landing, but it still needs to stop its engine because if it keeps with engine on and you assign troops as cargo, ArmA will try to figure out where to pick them up and will try to move the chopper and the troops there. And this position, as usual, is anywhere except where you want the soldiers to be picked up. Stopping the engine and keeping the chopper in its current position ensures the cargo will move to chopper position and chopper will not try to move away to pick up the cargo (and, as usual, crash before that tounge2.gif ).

Share this post


Link to post
Share on other sites

so the fast insertions are impossible because of the engine limitation? what about Eject the cargo?

[also could this script be used for boats and cars?] - Nevermind i tried it and it works with boats! yay.

Also i seem to be having problems getting a second chopper script to work in the same mission. I have my team inserted by boat using your script first then want them to be picked up by BlackHawk? i copied the first part of your intro mission where the helicopter pics up a soldier then flys off, into another SQS file "pickup.sqs" however i get a error in game. is it possible to do this or should they be kept int he same script, and some sort of wait command used in the middle?

Share this post


Link to post
Share on other sites

I tried to sort out this error all day.

error.jpg

now then im activating a script from a Radio Alpha Trigger in game

this exec "pickup.sqs"

pickup.sqs contains the following

Quote[/b] ]

titleText["Roger That Ghost Walker", "PLAIN DOWN"];

_scr = [heli1,[getPos dest3],50, true]execVM"mando_heliroute_arma.sqf";

Sleep 1;

waitUntil {heli1 getVariable "mando_heliroute" != "busy"};

{_x assignAsCargo heli1} forEach units group SF1;

units group SF1 orderGetIn true;

waitUntil {{_x in heli1} count units group SF1 == count units group SF1};

titleText["All In Ghost Rider, Get Us Out Of Dodge!", "PLAIN DOWN"];

_scr = [heli1,[getPos dest4],50, true]execVM"mando_heliroute_arma.sqf";

Sleep 2;

waitUntil {heli1 getVariable "mando_heliroute" != "busy"};

am i missing something?

Share this post


Link to post
Share on other sites

You code is SQF, and you have the script named .sqs and you are trying executing it with exec instead of execVM. Exec cannot interpret specific sqf commands like waitUntil. Rename it to sqf and execute it with execVM.

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
Sign in to follow this  

×