Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create_bomber_func = {
- _pos_to_bomb = _this select 0;
- _pos_where_plane_spawn = [_pos_to_bomb, 3500, 4000, 0, 1, 0, 0] call BIS_fnc_findSafePos;
- _good_pos_ps = [_pos_where_plane_spawn select 0, _pos_where_plane_spawn select 1, 800 + (_pos_to_bomb select 2)];
- _bomber_plane = createVehicle ["LIB_Ju87", _good_pos_ps, [], 0, "FLY"];
- _bomber_plane setPosASL _good_pos_ps;
- _bomber_plane setDir ([_bomber_plane, _pos_to_bomb] call get_orientation2);
- createVehicleCrew _bomber_plane;
- _bomber_group = createGroup [west, true];
- (crew _bomber_plane) joinSilent _bomber_group;
- _bomber_group setCombatMode "BLUE";
- _bomber_group setBehaviour "CARELESS";
- _pos_x_bp = _pos_to_bomb select 0;
- _pos_y_bp = _pos_to_bomb select 1;
- _pos_z_bp = _pos_to_bomb select 2;
- _distance_calculated = (_pos_to_bomb distance2D _pos_where_plane_spawn);
- _bomber_plane flyInHeight 0;
- _bomber_plane flyInHeightASL [800 + (_pos_to_bomb select 2),800 + (_pos_to_bomb select 2),800 + (_pos_to_bomb select 2)];
- _bomber_plane limitSpeed 350;
- _all_wp_pos = [];
- _last_wp_multiplier = 0;
- for "_compteur" from 0 to _distance_calculated step (_distance_calculated / 5) do {
- _cos_x_plr = ((cos ([_pos_to_bomb, _pos_where_plane_spawn] call get_orientation)) * _compteur) + _pos_x_bp;
- _sin_y_plr = ((sin ([_pos_to_bomb, _pos_where_plane_spawn] call get_orientation)) * _compteur) + _pos_y_bp;
- _all_wp_pos pushBack [_cos_x_plr, _sin_y_plr];
- };
- //reverse _all_wp_pos;
- _small_calc = (_distance_calculated / 5);
- _last_wp_multiplier = (_last_wp_multiplier - (_small_calc * 1));
- _cos_x_plr = ((cos ([_pos_to_bomb, _pos_where_plane_spawn] call get_orientation)) * _last_wp_multiplier) + _pos_x_bp;
- _sin_y_plr = ((sin ([_pos_to_bomb, _pos_where_plane_spawn] call get_orientation)) * _last_wp_multiplier) + _pos_y_bp;
- {
- _wp_pos = _x;
- _wp1 = _bomber_group addWaypoint [AGLToASL([_wp_pos select 0, _wp_pos select 1, 0]), -1, 0];
- _wp1 setWaypointPosition [AGLToASL([_wp_pos select 0, _wp_pos select 1, 0]), -1];
- _wp1 setWaypointType "MOVE";
- }forEach _all_wp_pos;
- _wp2 = _bomber_group addWaypoint [AGLToASL([_cos_x_plr, _sin_y_plr, 0]), -1, 0];
- _wp2 setWaypointPosition [AGLToASL([_cos_x_plr, _sin_y_plr, 0]), -1];
- _wp2 setWaypointType "MOVE";
- _bomber_plane;
- };
Add Comment
Please, Sign In to add comment