Jump to content
Sign in to follow this  
mandoble

Mando Heliroute for ArmA2

Recommended Posts

I am getting an ERROR in MP "Mando Heliroute: Vehicle must be Local?" I don't understand works fine in the editor.

Edited by vengeance1

Share this post


Link to post
Share on other sites

AWESOME mate thanks!

I was using your script for arma and had problems using it in chernarus

regards

Share this post


Link to post
Share on other sites

I love this script but it does seem a little like the choppers are on rails. Is there a way to smooth out the robot-like control to make it APPEAR more natural?

Share this post


Link to post
Share on other sites

Vengeance, that means that the script is being run in a client where the chopper is not local.

Kremator, it might be done, but not in the nearly future, quite busy with other things ATM.

Share this post


Link to post
Share on other sites
Vengeance, that means that the script is being run in a client where the chopper is not local.

I was using a trigger to execVM Mando sqf. The init in the trigger was:

player in CRRC3

I got the error: I guess that means chopper not local

I changed it to:

isplayer in CRRC3

Is that the right way?

Share this post


Link to post
Share on other sites

The problem is that whatever you put in the trigger is executed everywhere. You may open the script and just remove the hint, or put a condition in the action of the trigger: if (isLocal mychopper) then {execVM ...};

Share this post


Link to post
Share on other sites
The problem is that whatever you put in the trigger is executed everywhere. You may open the script and just remove the hint, or put a condition in the action of the trigger: if (isLocal mychopper) then {execVM ...};

Sorry not sure if I am being clear. In MP on Dedi Server

Trigger

INIT: Player in CRRC3 (I want Heliroute to execute only when a Player is AI Payable unit named "p6".

On Act: xxx=execVM "LHD_Land.sqf"

LHD_Land.sqf (has no hint)

Sleep 1;

_scr = [helo1,[getPos dest1],30, true]execVM"JAAF\mando_heliroute_arma.sqf";

Sleep 1;

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

Sleep 2;

h1 setVariable ["mando_heliroute", "free"];

Works fine in Editor not in MP, I don't know what to put in the Trigger INIT to make this work.

Share this post


Link to post
Share on other sites

try:

// LHD_Land.sqf
Sleep 4;
if (!local helo1) exitWith {};
_scr = [helo1,[getPos dest1],30, true]execVM"JAAF\mando_heliroute_arma.sqf";
Sleep 1;
waitUntil {helo1 getVariable "mando_heliroute" != "busy"};
Sleep 2;
helo1 setVariable ["mando_heliroute", "free", true];

Share this post


Link to post
Share on other sites
try:

// LHD_Land.sqf
Sleep 4;
if (!local helo1) exitWith {};
_scr = [helo1,[getPos dest1],30, true]execVM"JAAF\mando_heliroute_arma.sqf";
Sleep 1;
waitUntil {helo1 getVariable "mando_heliroute" != "busy"};
Sleep 2;
helo1 setVariable ["mando_heliroute", "free", true];

Great thanks I'll give it a go.

Share this post


Link to post
Share on other sites

How do you actually use this, it sounds great. Advice please :)

Share this post


Link to post
Share on other sites

The script header has all the usage info, and the mission included is a practical example.

Share this post


Link to post
Share on other sites

Mandoble,

I'm using this lovely script as it is built into Carrier Domination 2 1.10.

Couple of things.. I made it use the MV22 and the aircraft arrives nice and quickly, but it overflies the pickup point and never returns.

I've changed it to use a different helo, (adukes '60 ERFS) and that picks up fine and returns to the carrier, but it collides with the superstructure. The only way to make it work is to eject before it gets too low. You can fastrope from these helos, and it does work, but the helo always crashes on me before I can get clear.

Any thoughts?

Share this post


Link to post
Share on other sites

Well, the superstructure of the LHD can be avoided placing another heliroute position far to the left or to the right of the desired landing position in the back of the LHD. So the chopper flyes there, then turns and aims the LHD so that its trajectory intersects the back deck of the LHD, in final aproach the chopper would come from the left or right and aproaching the LHD's back, so, likely avoiding the superstructure. Other option might be to give it a high enough flying altitude to avoid the superstructure always, no matter the aproaching direction.

AH! btw, no idea which version of this script is implemented in Carrier domination. So, consider this answer as applicable at least to Utes LHD and if using the latest public version of mando heliroute.

Share this post


Link to post
Share on other sites
Well, the superstructure of the LHD can be avoided placing another heliroute position far to the left or to the right of the desired landing position in the back of the LHD. So the chopper flyes there, then turns and aims the LHD so that its trajectory intersects the back deck of the LHD, in final aproach the chopper would come from the left or right and aproaching the LHD's back, so, likely avoiding the superstructure. Other option might be to give it a high enough flying altitude to avoid the superstructure always, no matter the aproaching direction.

AH! btw, no idea which version of this script is implemented in Carrier domination. So, consider this answer as applicable at least to Utes LHD and if using the latest public version of mando heliroute.

I have used this approach and works fine with the GLT_LHD.pbo using a CH47, lands fine.

Share this post


Link to post
Share on other sites

I think the problem is the very last waypoint on it's journey. As it transitions to the hover and starts to descend to the deck, it collides with the aft superstructure.

Is it possible to specify that it lands somewhere else on the deck?

---------- Post added at 06:19 PM ---------- Previous post was at 05:04 PM ----------

AH! btw, no idea which version of this script is implemented in Carrier domination.

mando_heliroute_arma.sqf v1.2

---------- Post added at 06:49 PM ---------- Previous post was at 06:19 PM ----------

I dropped the v1.3 version into the mission, but it didn't like that at all. The helo found me but shut it's engines off while still in the hover and crashed.

Back to 1.2 :)

Share this post


Link to post
Share on other sites

Can't you just adjust the height of the last move to higher than the deck?

Mine is at:

Sleep 4;

if (!local helo1) exitWith {};

_scr = [helo1,[getPos dest1],30, true]execVM"JAAF\mando_heliroute_arma.sqf";

Sleep 1;

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

Sleep 2;

helo1 setVariable ["mando_heliroute", "free", true];

Share this post


Link to post
Share on other sites

I don't know how. :)

Ideally, the helo would simply land right at the aft end of the ship, there's plenty of room there. The problem is as it makes it's final descent, it hits the aft superstructure.

Correction: It hits the fore superstructure. I got the ship the wrong way round! :)

Edited by Tankbuster

Share this post


Link to post
Share on other sites

Tankbuster, the flying height is the fourth parameter of the script. The script also considers the Z component of the last route position in the array, so you can put there a higher number to avoid violent collision with flight deck.

Share this post


Link to post
Share on other sites

Thanks for that. If I'm honest, I'm a little out of my depth with the scripting, but I will look closely this.

The collision isn't with the deck though, it seems to handle the fact the deck is well above ground level quite well. What it can't handle is the place at which it goes into a hover and starts to descend for the landing. This place is too close to the superstructure.

Share this post


Link to post
Share on other sites

Cannot you put the landing position a bit more away from the superestructure? Or placing there another position before the last one and placed so that it might force a safer aproach to the final landing position?

Share this post


Link to post
Share on other sites

You're crediting me with more coding knowledge than I have! :)

I have studied the code to the best of my ability, but am struggling.

The solution is indeed to put the landing position away from the superstructure. There's lots of room right on the bow. That would be the best place.

Share this post


Link to post
Share on other sites

every time i try it, as soon as the AI heli is about to land it pops up on my screen script mando_heliroute_arma.sqf is not valid, or something like that. i dunno what im doing wrong. i put it in the waypoint condition block. helis name was hawk01 and waypoint name was land. heres what i put:

xxx=[hawk01,[getpos land],30,true]execvm"mando_heliroute_arma.sqf"

any suggestions?

Share this post


Link to post
Share on other sites

as long as "land" is a known object, it should work. You may also add to the code:

if (local hawk01) then {xxx=[hawk01,[getpos land],30,true]execvm"mando_heliroute_arma.sqf";};

Anyway, it might be better if you copy here the exact message you are getting on screen.

Share this post


Link to post
Share on other sites

what it says is: Script mando_heliroute_arma.sqf not found

and when i try to put the {} in the code it says type code, expected bool. i have no idea what that means.

i still think im doing something wrong. the waypoint name is land (which is on the LHD btw) and i have the unit name and stuff. i just feel like im missing something

but i dont know what you mean by known object. land is just a waypoint name that i set on the LHD. do i have to put in an H or something? i even added a hawk1 "land" code in the actual script block and it still wont do it.

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  

×