Jump to content
Sign in to follow this  
Meatball0311

My helo keeps making hard landings

Recommended Posts

I scripted some waypoints and the helo makes a hard landing damaging the helo? Here are my scripted waypoints. This happens about 98% of the time

_approach = getMarkerPos "APPROACHmarker"

_wp = UH1group addWaypoint [_approach, 0]

[uH1group, 1] setWPPos _approach

[uH1group, 1] setWaypointType "MOVE"

[uH1group, 1] setWaypointSpeed "FULL"

_exlz1 = getMarkerPos "EXLZ1marker"

_wp2 = UH1group addWaypoint [_exlz1, 0]

[uH1group, 2] setWPPos _exlz1

[uH1group, 1] setWaypointType "LOAD"

[uH1group, 1] setWaypointSpeed "FULL"

_team1wp1 = Team1 addWaypoint [position EXLZ1, 10]

[Team1, 1] setWPPos getPos EXLZ1

[Team1, 1] setWaypointType "GETIN"

[Team1, 1] setWaypointSpeed "FULL"

[Team1, 1] setWaypointFormation "COLUMN"

[uH1group, 2] synchronizeWaypoint [ [Team1, 1] ]

#DistanceCheck1

? (P1 distance _exlz1) < 200 : goto "DROP"

goto "DistanceCheck1"

#DROP

UH1 setSpeedMode "LIMITED"

SPT_R1 assignAsCargo UH1

SPT_TL1 assignAsCargo UH1

SPT_AR1 assignAsCargo UH1

SPT_AA1 assignAsCargo UH1

SPT_HM1 assignAsCargo UH1

SPT_AGL1 assignAsCargo UH1

[sPT_R1, SPT_TL1, SPT_AR1, SPT_AA1, SPT_HM1, SPT_AGL1] orderGetIn true

Edited by Meatball0311

Share this post


Link to post
Share on other sites

I have fixed the situation of the helo landing without crashing I used:

; Calling for EXTRACTION

; Must place 4 Empty Helo LZ

; this exec "helo_extract.sqs"

; create LZ map markers

_exlz1 = createMarker["EXLZ1marker",getPos CARNAGE]

_exlz1 setMarkerShape "ICON"

"EXLZ1marker" setMarkerType "mil_triangle"

"EXLZ1marker" setMarkerSize [.5, .5]

"EXLZ1marker" setMarkerColor "ColorOrange"

"EXLZ1marker" setMarkerText "1"

_approach = createMarker["APPROACHmarker",getPos CARNAGE]

_approach setMarkerShape "ICON"

"APPROACHmarker" setMarkerType "Pickup"

"APPROACHmarker" setMarkerSize [.5, .5]

"APPROACHmarker" setMarkerColor "ColorGreen"

~0.5

player sideChat ": Carnage this is Spartan.... Over."

setfire=true

~3

CARNAGE sideChat "(CARNAGE): This is Carnage... send your traffic. Over."

~2

titleText ["CLICK ON MAP TO SET HELO EXTRACT GRID","plain down"]

~1

; set extaction LZ

onMapSingleClick "EXLZ1 setPosATL _pos; setfire=false; onMapSingleClick ''; true"

@!setfire

~1

; set H (invisible) objects in Y formation

_pos = position EXLZ1

_posx = _pos select 0

_posy = _pos select 1

_posz = _pos select 2

_ang1 = -((wind select 0) atan2 (wind select 1))

~0.01

_ang2 = -((wind select 0) atan2 (wind select 1))

~0.01

_ang3 = -((wind select 0) atan2 (wind select 1))

~0.01

_avgang = (_ang1 + _ang2 + _ang3) / 3

APPROACH setPosATL [_posx + sin(_avgang)* 0,_posy + cos(_avgang)* - 2000,0]

EXLZ1 setDir _avgang

APPROACH setDir _avgang

; moving LZ markers to H (invisible) positions

;

"EXLZ1marker" setmarkerpos getPos EXLZ1

"APPROACHmarker" setmarkerpos getPos APPROACH

"EXLZ1marker" setMarkerDir _avgang

"APPROACHmarker" setMarkerDir _avgang

onMapSingleClick "";

titleText ["", "plain down"]

~3

player sideChat "- Request Helo Extract... grid 3.. 7.. 4.. 8.. 9'er.. 2. Over"

~2

CARNAGE sideChat "(CARNAGE)- We copy grid 3 7 4 8 9'er 2... Helo's on the way. Out"

~0.1

; setting spawning locations for pilots

_UH1tent = getMarkerPos "UH1tent"

; create pilots type createUnit [ position, group, init, skill, rank]

UH1group = createGroup WEST

_p1 = "USMC_Soldier_Pilot" createUnit [_UH1tent, UH1group, "P1=this", 1, "MAJOR"]

_n1 = "USMC_Soldier_Pilot" createUnit [_UH1tent, UH1group, "N1=this", 1, "LIEUTENANT"]

_gunner1 = "USMC_Soldier_Crew" createUnit [_UH1tent, UH1group, "G1=this", 1, "PRIVATE"]

_gunner2 = "USMC_Soldier_Crew" createUnit [_UH1tent, UH1group, "G2=this", 1, "PRIVATE"]

P1 = leader UH1group

P1 setFace "face12"

N1 setFace "face54"

G1 setFace "face13"

G2 setFace "face14"

P1 assignAsDriver UH1

P1 moveInDriver UH1

N1 assignAsGunner UH1

N1 moveInTurret [uH1, [2]]

G1 assignAsGunner UH1

G1 moveInTurret [uH1,[0]]

G2 assignAsGunner UH1

G2 moveInTurret [uH1,[1]]

~1

; giving helos orders to move to extraction LZ until

_wp1 = UH1group addWaypoint [markerPos "APPROACHmarker", 0]

[uH1group, 1] setWPPos markerPos "APPROACHmarker"

[uH1group, 1] setWaypointType "MOVE"

[uH1group, 1] setWaypointSpeed "FULL"

_wp2 = UH1group addWaypoint [markerPos "EXLZ1marker", 0]

[uH1group, 2] setWPPos markerPos "EXLZ1marker"

[uH1group, 2] setWaypointType "MOVE"

[uH1group, 2] setWaypointSpeed "FULL"

_teamwp = Team1 addWaypoint [markerPos "EXLZ1marker", 20]

[Team1, 1] setWPPos markerPos "EXLZ1marker"

[Team1, 1] setWaypointType "GETIN"

[Team1, 1] setWaypointSpeed "FULL"

[Team1, 1] setWaypointFormation "COLUMN"

#DistanceCheck1

? (P1 distance EXLZ1) < 200 : goto "DROP"

goto "DistanceCheck1"

#DROP

_home = getPos UH1home

_wp3 = UH1group addWaypoint [getPos EXLZ1, 0]

[uH1group, 3] setWPPos getPos EXLZ1

[uH1group, 3] setWaypointType "LOAD"

[uH1group, 3] setWaypointSpeed "LIMITED"

[Team1, 1] synchronizeWaypoint [ [uH1group, 3] ]

UH1 doWatch EXLZ1

P1 sideChat "(BLACK WIDOW ONE): 30 seconds... Over"

#assign

{_x assignAsCargo UH1} forEach units Team1

{_x orderGetIn true} forEach units Team1

I need to have here a "if" statement so it will move on to the next waypoint. I am thinking I need to have UH1 check to see if all is onboard then goto "nextwaypoint"..... any suggestions????

goto "assign"

I need to have here a "if" statement so it will move on to the next waypoint. I am thinking I need to have UH1 check to see if all is onboard then goto "nextwaypoint"..... any suggestions????

Edited by Meatball0311

Share this post


Link to post
Share on other sites

WTF! I am pretty sure that this should be correct, but I the helo is still landing hard causing it to be damaged almost every single time I call it??!!!!???!! PLEASE any suggestions?

//////////////////////////////////////////////////////////////////

// Made by Meatball0311

//////////////////////////////////////////////////////////////////

private ["_outboundpos", "_inboundpos", "_uhlz1", "_approach", "_pos", "_posx", "_posy", "_posz", "_ang1", "_ang2", "_ang3", "_avgang"];

// create map markers

_outboundpos = createMarker["OUTBOUNDmarker",getPos OUTobject];

_outboundpos setMarkerShape "ICON";

"Outboundmarker" setMarkerType "waypoint";

"Outboundmarker" setMarkerSize [.3, .3];

"Outboundmarker" setMarkerColor "ColorGreen";

"Outboundmarker" setMarkerText "OUTBOUND FLIGHT PATH";

_inboundpos = createMarker["INBOUNDmarker",getPos INobject];

_inboundpos setMarkerShape "ICON";

"Inboundmarker" setMarkerType "waypoint";

"Inboundmarker" setMarkerSize [.3, .3];

"Inboundmarker" setMarkerColor "ColorRed";

"Inboundmarker" setMarkerText "INBOUND FLIGHT PATH";

_uhlz1 = createMarker["UHLZ1marker",getPos UH1home];

_uhlz1 setMarkerShape "ICON";

"UHLZ1marker" setMarkerType "mil_triangle";

"UHLZ1marker" setMarkerSize [.3, .3];

"UHLZ1marker" setMarkerColor "ColorOrange";

"UHLZ1marker" setMarkerText "1";

_approach = createMarker["APPROACHmarker",getPos UH1home];

_approach setMarkerShape "ICON";

"APPROACHmarker" setMarkerType "Pickup";

"APPROACHmarker" setMarkerSize [.3, .3];

"APPROACHmarker" setMarkerColor "ColorGreen";

// Radio trasmission REQUEST HELO EXTRACT

PLT1_CMD sideChat "CARNAGE this is RHINO actual, over";

setfire=true;

CARNAGE_RO sideChat "RHINO actual we read you loud and clear, send your traffic, over";

PLT1_CMD sideChat "Roger, requesting helo extract, stand by for grid....";

CARNAGE_RO sideChat "Roger, standing by...";

titleText ["CLICK ON MAP TO SET HELO EXTRACT GRID","plain down"];

// set extaction LZ

onMapSingleClick "UHLZ1 setPosATL _pos; setfire=false; onMapSingleClick ''; true";

waitUntil {!setfire};

Sleep 1;

// set H (invisible) objects in Y formation

_pos = position UHLZ1;

_posx = _pos select 0;

_posy = _pos select 1;

_posz = _pos select 2;

_ang1 = -((wind select 0) atan2 (wind select 1));

Sleep 0.01;

_ang2 = -((wind select 0) atan2 (wind select 1));

Sleep 0.01;

_ang3 = -((wind select 0) atan2 (wind select 1));

Sleep 0.01;

_avgang = (_ang1 + _ang2 + _ang3) / 3;

UHLZ1 setDir _avgang;

UHAPPROACH setPosATL [_posx + sin(_avgang)* 0,_posy + cos(_avgang)* - 500,0];

UHAPPROACH setDir _avgang;

// moving LZ markers to H (invisible) positions

"UHLZ1marker" setmarkerpos getPos UHLZ1;

"APPROACHmarker" setmarkerpos getPos UHAPPROACH;

// setting markers to face _avgang

"UHLZ1marker" setMarkerDir _avgang;

"APPROACHmarker" setMarkerDir _avgang;

onMapSingleClick "";

titleText ["", "plain down"];

private ["_UH1spawn", "_aviator", "_nav", "_gunner1", "_gunner2", "_wp1", "_wp2", "_wp3", "_wp4", "_wp5", "_wp1inf", "_x"];

// setting spawning locations for pilots

_UH1spawn = getMarkerPos "UHcrewspawnpos";

// create pilots type createUnit [ position, group, init, skill, rank]

UH1group = createGroup WEST;

_aviator = "USMC_Soldier_Pilot" createUnit [_UH1spawn, UH1group, "P_1=this", 1, "MAJOR"];

_nav = "USMC_Soldier_Pilot" createUnit [_UH1spawn, UH1group, "N_1=this", 1, "LIEUTENANT"];

_gunner1 = "USMC_Soldier_Crew" createUnit [_UH1spawn, UH1group, "G_1=this", 1, "PRIVATE"];

_gunner2 = "USMC_Soldier_Crew" createUnit [_UH1spawn, UH1group, "G_2=this", 1, "PRIVATE"];

P_1 setFace "face12";

N_1 setFace "face54";

G_1 setFace "face13";

G_2 setFace "face14";

P_1 assignAsDriver UH1;

P_1 moveInDriver UH1;

N_1 assignAsGunner UH1;

N_1 moveInTurret [uH1, [2]];

G_1 assignAsGunner UH1;

G_1 moveInTurret [uH1,[0]];

G_2 assignAsGunner UH1;

G_2 moveInTurret [uH1,[1]];

Sleep 3;

CARNAGE_RO sideChat "We copy grid... Helo's on the way. Out";

P_1 flyInHeight 50;

Sleep 0.125;

_wp1 = UH1group addWaypoint [getPos OUTobject, 0];

[uH1group, 1] setWPPos getPos OUTobject;

[uH1group, 1] setWaypointType "MOVE";

[uH1group, 1] setWaypointSpeed "FULL";

waitUntil {P_1 distance OUTobject < 300};

Sleep 0.125;

_wp2 = UH1group addWaypoint [getPos UHApproach, 0];

[uH1group, 2] setWPPos getPos UHApproach;

[uH1group, 2] setWaypointType "MOVE";

[uH1group, 2] setWaypointSpeed "FULL";

waitUntil {P_1 distance UHApproach < 300};

Sleep 0.125;

_wp3 = UH1group addWaypoint [getPos UHLZ1, 0];

[uH1group, 3] setWPPos getPos UHLZ1;

[uH1group, 3] setWaypointType "LOAD";

[uH1group, 3] setWaypointSpeed "LIMITED";

waitUntil {P_1 distance UHLZ1 < 200};

Sleep 0.125;

_wp4 = UH1group addWaypoint [getPos INobject, 0];

[uH1group, 4] setWPPos getPos INobject;

[uH1group, 4] setWaypointType "MOVE";

[uH1group, 4] setWaypointSpeed "FULL";

_wp5 = UH1group addWaypoint [getPos UH1home, 0];

[uH1group, 5] setWPPos getPos UH1home;

[uH1group, 5] setWaypointType "GETOUT";

[uH1group, 5] setWaypointSpeed "FULL";

_wp1inf = INFgroup addWaypoint [getPos UHLZ1, 0];

[iNFgroup, 1] setWPPos getPos UHLZ1;

[iNFgroup, 1] setWaypointType "GETIN";

[iNFgroup, 1] setWaypointSpeed "FULL";

[iNFgroup, 1] setWaypointFormation "COLUMN";

[iNFgroup, 1] synchronizeWaypoint [ [uH1group, 3] ];

_wp2inf = INFgroup addWaypoint [getPos UH1home, 0];

[iNFgroup, 2] setWPPos getPos UH1home;

[iNFgroup, 2] setWaypointType "GETOUT";

[iNFgroup, 2] setWaypointSpeed "FULL";

[iNFgroup, 2] setWaypointFormation "COLUMN";

[iNFgroup, 2] synchronizeWaypoint [ [uH1group, 5] ];

{_x assignAsCargo UH1} forEach units INFgroup;

(units INFgroup) orderGetIn true;

waituntil {{_x in UH1} count units INFgroup == count units INFgroup};

Edited by Meatball0311

Share this post


Link to post
Share on other sites

meatball if you want help you need to give us an example mission, i built something similiar but with an extra feauture for the choper to look for even and clear ground and then land , so if you need help put down a example mission

Share this post


Link to post
Share on other sites
meatball if you want help you need to give us an example mission, i built something similiar but with an extra feauture for the choper to look for even and clear ground and then land , so if you need help put down a example mission

Thanks for your reply. It is a pretty simple script, all I am wanting is to have an helo extract based on a onMapSingleClick. I do have a return waypoint made, but the helo is always slaming into the ground when landing. Basically the script is called via Radio Trigger Alpha, then you click on the map for helo extraction pos. The helo (named UH1) will fly to the pos and the unit that is being picked up (INFgroup) orders a GETIN command, and the helo goes to land but instead it hovers then slams into the ground. I even scripted waypoints (_wp1, _wp2, _wp3, _wp4, _wp5) that are synched to INFgroup.

I will include a sample mission and will try my best to explain what to do.

Here is sample mission "test.utes" and a readme that explains what to do

http://www.filefront.com/15438909/test.utes.zip

Edited by Meatball0311

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  

×