Jump to content
Sign in to follow this  
cash

Trouble with waypoint "GETIN"

Recommended Posts

Hello all ,help me please , I am have a trouble with waypoint "GETIN". The group just won't get in the chopper , it seems like the chopper is locked for them . Here is the code :

//ALL MARKERS IS ALREADY HAS BEEN PLACED IN EDITOR//
_grpheli = createGroup west;
//_pilot = "B_Helipilot_F" createunit [getMarkerPos "barracks",_grpheli,"",1,"NONE"];
"B_Helipilot_F" createUnit [ getMarkerPos "barracks1", _grpheli];
//[color="#FF0000"]In both cases created a unit perfect,i'v try both of it for the rest piece of code[/color]//
//_heli = createVehicle ["B_Heli_Transport_01_camo_F",getMarkerPos "helispawn",[],0,"FORM"];
_heli = "B_Heli_Transport_01_camo_F" createVehicle getMarkerPos "helispawn";
//_____________________________________________________________________________________//
_pilot = leader _grpheli;
_pilot assignAsDriver _heli;
[_pilot,1] orderGetIn true;

//[color="#FF0000"]Working good the pilot is in heli[/color]//
_troops = createGroup west;
_soldier1 = "B_Soldier_F" createunit [getMarkerPos "barracks",_troops,"",1,"PRIVATE"];
_soldier2 = "B_Soldier_F" createunit [getMarkerPos "barracks",_troops,"",1,"PRIVATE"];
_soldier3 = "B_Soldier_F" createunit [getMarkerPos "barracks",_troops,"",1,"PRIVATE"];
//player joinAs [_troops, 4];//[color="#FF0000"]If this command is not active , i am able getin
but if the command is active , the heli is locked for me and other group members. [/color]//


//[color="#FF0000"]Units creates fine [/color]//
_wpPilot1 = _grpheli addWaypoint [position _heli, 0];
[_grpheli,0] setWaypointType "MOVE";
_wpPilot2 = _grpheli addWaypoint [getMarkerPos "HeliPad", 1];
[_grpheli,1] setWaypointType "LOAD";
_wpPilot3 = _grpheli addWaypoint [getMarkerPos "LZ", 2];
[_grpheli,2] setWaypointType "TR UNLOAD";
//[color="#FF0000"]The WP are working excellent [/color]//

_wpTroops1 = _troops addWaypoint [getMarkerPos "HeliPad", 0];
[_troops,0] setWaypointType "MOVE";
_wpTroops2 = _troops addWaypoint [getMarkerPos "helispawn", 1];
[_troops,1] setWaypointType "GETIN";
_wpTroops3 = _troops addWaypoint [getMarkerPos "LZ", 2];
[_troops, 2] setWaypointType "GETOUT";
[_grpheli,2] synchronizeWaypoint [[_troops,2]];
[_grpheli,1] synchronizeWaypoint [[_troops,1]];
//[color="#FF0000"]All Waypoints in this section is working, but group won't mount [/color]//

Share this post


Link to post
Share on other sites

//ALL MARKERS IS ALREADY HAS BEEN PLACED IN EDITOR//
_grpheli = createGroup west;
//_pilot = "B_Helipilot_F" createunit [getMarkerPos "barracks",_grpheli,"",1,"NONE"];
"B_Helipilot_F" createUnit [ getMarkerPos "barracks1", _grpheli];
//In both cases created a unit perfect,i'v try both of it for the rest piece of code//
//_heli = createVehicle ["B_Heli_Transport_01_camo_F",getMarkerPos "helispawn",[],0,"FORM"];
_heli = "B_Heli_Transport_01_camo_F" createVehicle getMarkerPos "helispawn";
//_____________________________________________________________________________________//
_pilot = leader _grpheli;
_pilot assignAsDriver _heli;
[_pilot,1] orderGetIn true;


//Working good the pilot is in heli//
_troops = createGroup west;
_soldier1 = "B_Soldier_F" createunit [getMarkerPos "barracks",_troops,"",1,"PRIVATE"];
_soldier2 = "B_Soldier_F" createunit [getMarkerPos "barracks",_troops,"",1,"PRIVATE"];
_soldier3 = "B_Soldier_F" createunit [getMarkerPos "barracks",_troops,"",1,"PRIVATE"];
//player joinAs [_troops, 4];//If this command is not active , i am able getin
but if the command is active , the heli is locked for me and other group members. //


//Units creates fine //
_wpPilot1 = _grpheli addWaypoint [position _heli, 0];
_wpPilot1 setWaypointType "MOVE";
_wpPilot2 = _grpheli addWaypoint [getMarkerPos "HeliPad", 0];
_wpPilot2 setWaypointType "LOAD";
_wpPilot3 = _grpheli addWaypoint [getMarkerPos "LZ", 0];
_wpPilot3 setWaypointType "TR UNLOAD";
//The WP are working excellent //

_wpTroops1 = _troops addWaypoint [getMarkerPos "HeliPad", 0];
_wpTroops1 setWaypointType "MOVE";
_wpTroops2 = _troops addWaypoint [getMarkerPos "helispawn", 0];
_wpTroops2 setWaypointType "GETIN";
_wpTroops3 = _troops addWaypoint [getMarkerPos "LZ", 0];
_wpTroops3 setWaypointType "GETOUT";
_wpPilot2 synchronizeWaypoint [_wpTroops2];
_wpPilot3 synchronizeWaypoint [_wpTroops3];
//All Waypoints in this section is working, but group won't mount, they just proceed to the next Waypoint //

Try the above code. Pay close attention to how addWaypoint works : addWaypoint[<position>,<RADIUS>,<Index>];

You weren't actually setting the index there, you were making the radius larger.

I changed your code to reference the waypoints (which you were storing anyway) so this should now work. Also, I believe that your indexes were off by one because any created unit gets a zero-index waypoint on its spawn location.

Share this post


Link to post
Share on other sites

Thank you for help , but the group don't want board the chopper anyway .

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  

×