Jump to content

FlathEarth__Cultist

Member
  • Content Count

    2
  • Joined

  • Last visited

  • Medals

Community Reputation

0 Neutral

About FlathEarth__Cultist

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. FlathEarth__Cultist

    BIS_fnc_spawnVehicle is not working

    Yes, thats my bad. fnLog don't show any errors even if some vars are missing.
  2. Im trying to spawn jet with crew (pilot) in air, but "BIS_fnc_spawnVehicle" don't return even empty array, code: _spawnMarker = selectRandom ["markerSPopforAC2", "markerSPopforAC1", "markerSPopforAC0"]; _enemiesCount = selectRandom [2, 3, 4]; _height = selectRandom [700, 1000, 1250, 1500]; _isSaD = false; _position = getMarkerPos _spawnMarker; _position set [2, _height]; //fix height if(_spawnMarker == "markerSPopforAC2") then { _isSad = true; }; try { ["Spawning root at: %1 // count: %2 // SaD: %3", _spawnMarker, str _enemiesCount, str _isSad] call fnLog; _root = [_position, 180, "O_Plane_CAS_02_F", east] call BIS_fnc_spawnVehicle; _rootGroup = _root select 2; _rootVehicle = _root select 0; ["Spawn pos: %1, root: %2", str _position, str root] call fnLog; // for [{_i = 0}, {_i < (_enemiesCount - 1)}, {_i = _i + 1}] do { // _child2DPos = [_position, 100, 500, 0, 1, 0, 0] call BIS_fnc_findSafePos; // _childFixedPos = [_child2DPos select 0, _child2DPos select 1, _height]; //setup array with missing height // _child = [_position, 180, "O_Plane_CAS_02_F", east] call BIS_fnc_spawnVehicle; // //_childCrew IS ARRAY // _childCrew = _child select 1; // //take first member of crew (we have only one pilot) // //and join him to group // [_childCrew select 0] join _rootGroup; // }; _waypointPos = _position; _waypointType = "CYCLE"; // if(_isSaD) then { // _waypointPos = getMarkerPos "marker_10"; // _waypointType = "SAD"; // }; _waypoint = _rootGroup addWaypoint [_waypointPos, 0, 1]; _waypoint setWaypointType _waypointType; } catch { ["Error occured: %1", str _exception] call fnLog; hint str _exception; }; Sample debug output: Spawning root at: markerSPopforAC0 // count: 4 // SaD: false Spawn pos: [12715.8,29182.7,1000], root: I would be thankful for any suggestions.
×