Jump to content

mikey74

Member
  • Content count

    894
  • Joined

  • Last visited

  • Medals

Community Reputation

115 Excellent

About mikey74

  • Rank
    First Sergeant

core_pfieldgroups_3

  • Interests
    Arma series.Gaming, would like a few friends.lol
  • Occupation
    Lead Printing Press operator

Profile Information

  • Gender
    Male

Contact Methods

  • Biography
    Full time father,pressman, and part time programmer.
  • Steam url id
    http://steamcommunity.com/profiles/76561198027207954/

Recent Profile Visitors

967 profile views
  1. Standalone JTAC Script

    Maybe try this? _designatedPos = position laserTarget player; https://community.bistudio.com/wiki/laserTarget Brian I am also working on a script involving the USS Freedom AI taking off and landing. I finally got it working again. Would you be able to use this in with your Jtac script? I've still got things I'm working out, but was going to use it to make a support type script for Missions off the Freedom and Liberty. Time probably will not be kind to me. lol anywho same offer I make to others. if you need help give me a shout. If I can I will. :)
  2. Compilation List of my GF Scripts

    GEORGE FLOROS GR I havnt and wont be able to have a look at your scripts for a few days, but looks interesting. I'm sure you are way more advanced at coding than I am, but let me know if you need help or some scripts. May be I have some or have started a few. ;) I'd be more than happy to contribute to your scripts or make a script pack for/with you if your interested and time permits.
  3. Hi abs,

     

    Are you still working on the star trek Mod? 

  4. You can use stock Bis Scripts for that. ;) If you go into function in the editor the select Jets in one of the categories. Bis has some farely decent scripts. Yes. I've been considering it. Pretty sure as soon as I post it someone else will post one that's better. ;) lol If I get time and nothing pops up I may work on script packs and maybe modules. Been very busy in my life so all my mods have been neglected or plain abandoned.
  5. This is the Launch code I use to Launch the planes. params ["_plane","_dirCatapult","_velocityLaunch","_velocityIncrease","_accelerationStep","_posCatapult"]; _dirCatapult = (_dirCatapult - 0.3); _plane allowDamage false; _plane setAirplaneThrottle 1; _plane setPosWorld _posCatapult; private _velocity = 0; private _timeStart = time - 1.75; private _timeDelta = 0; _plane setVectorDir (surfaceNormal (getPosASL _plane)); _plane setDir _dirCatapult; [_plane, 0, 0] call BIS_fnc_setPitchBank; while { (speed _plane < (_velocityLaunch + 210) && {isEngineOn _plane && {((getPos _plane) param [2,0]) < 7}}) || _plane distance _posCatapult <= 140 } do { _plane setAirplaneThrottle 1; _timeDelta = (time - _timeStart); _velocity = _velocityIncrease * _timeDelta; _plane setVelocity [sin _dirCatapult * _velocity,cos _dirCatapult * _velocity,(velocity _plane select 2)]; if (_plane distance _posCatapult < 121 && (istouchingGround _plane)) then {[_plane, 0, 0] call BIS_fnc_setPitchBank} else {[_plane, -2, 0] call BIS_fnc_setPitchBank}; sleep _accelerationStep; }; This is Deck control script for Launching: _plane = param [0,objNull,[objNull]]; _hulls = param [1,["Land_Carrier_01_hull_04_1_F","Land_Carrier_01_hull_04_F","Land_Carrier_01_hull_07_1_F","Land_Carrier_01_hull_07_F"],[[]]]; _carrier = param [2,objNull,[objNull]]; _pos = param [3,(getPosWorld _plane),[[]]]; private _dir = getDir _plane; private _height = _pos select 2; _car_dir = getdir _carrier; _plane_dir = _plane getdir _carrier; //private _hull = selectRandom _hulls; private _partClass = ""; _partClass = switch (true) do { case ((_plane distance _carrier) < 100 && "Land_Carrier_01_hull_04_1_F" in _hulls): {"Land_Carrier_01_hull_04_1_F"}; case ((_plane distance _carrier) < 100 && "Land_Carrier_01_hull_04_F" in _hulls): {"Land_Carrier_01_hull_04_F"}; case ((_plane distance _carrier) > 100 && "Land_Carrier_01_hull_07_1_F" in _hulls): {"Land_Carrier_01_hull_07_1_F"}; case ((_plane distance _carrier) > 100 && "Land_Carrier_01_hull_07_F" in _hulls): {"Land_Carrier_01_hull_07_F"}; default { Nil }; }; if (isNil "_partClass") exitWith {hint "No carrier hull parts found"}; _catapult = switch (true) do { case (_partClass isEqualTo "Land_Carrier_01_hull_04_1_F"): {selectRandom ["Catapult1","Catapult1"]}; case (_partClass isEqualTo "Land_Carrier_01_hull_04_F"): {selectRandom ["Catapult1","Catapult2"]}; case (_partClass isEqualTo "Land_Carrier_01_hull_07_1_F"): {selectRandom ["Catapult3","Catapult4"]}; case (_partClass isEqualTo "Land_Carrier_01_hull_07_F"): {selectRandom ["Catapult3","Catapult4"]}; default { Nil }; }; if (isNil "_catapult") exitWith {hint "No catapults found"}; private _carrierObjects = _carrier nearObjects [_partClass , 200]; private _part = _carrierObjects param [0, objNull]; private _configPath = configfile >> "CfgVehicles" >> _partClass >> "Catapults" >> _catapult; private _animations = getArray (_configPath >> "animations"); private _memPoint = getText (_configPath >> "memoryPoint"); private _dirOffset = getNumber (_configPath >> "dirOffset"); private _posCatapult = _part modelToWorld (_part selectionPosition _memPoint); _posCatapult set [2, _height]; private _dirCatapult = (getDir _part - _dirOffset - 180) % 360; private _configPlane = configFile >> "CfgVehicles" >> typeOf _plane; private _velocityLaunch = getNumber (_configPlane >> "CarrierOpsCompatability" >> "LaunchVelocity") max 210; private _velocityIncrease = getNumber (_configPlane >> "CarrierOpsCompatability" >> "LaunchVelocityIncrease") max 35; private _accelerationStep = getNumber (_configPlane >> "CarrierOpsCompatability" >> "LaunchAccelerationStep") max 0.09; private _launchBar = getText (_configPlane >> "CarrierOpsCompatability" >> "LaunchBarMemoryPoint"); _car_dir = getdir _carrier; _plane_dir = _plane getdir _carrier; _dir_setting = if ((((_car_dir - _plane_dir) + 360) mod 360) <180) then { [_plane,(_car_dir - 90)] call UssF_fnc_USS_Freedom_AP_turn; } else { [_plane,(_car_dir + 90)] call UssF_fnc_USS_Freedom_AP_turn; }; [_plane,_part,_configPath,_memPoint,_posCatapult,_carrier] call UssF_fnc_USS_Freedom_GoCat; [_plane,_dirCatapult] call UssF_fnc_USS_Freedom_AP_turn; _plane setVariable ["Stayput",true,true]; [_plane,10] spawn UssF_fnc_USS_Freedom_Brakes; _plane animate ["wing_fold_l", 0]; _plane animate ["wing_fold_r", 0]; sleep 10; _plane setVariable ["Stayput",false,true]; waitUntil {_plane getVariable "BrakesRon"}; [_plane,_dirCatapult,_velocityLaunch,_velocityIncrease,_accelerationStep,_posCatapult] call UssF_fnc_USS_Freedom_Luanch; This is for Braking the plane so it doesn't drive off while you are trying to Launch it. params ["_plane","_howlong"]; private _howlong = if (isNil "_howlong") then {86400} else {_howlong}; private _pos = GetPosASL _plane; (vehicle _plane) forceSpeed 0; (vehicle _plane) disableAI "MOVE"; _timer = time + _howlong; _plane setVariable ["BrakesRon",true,true]; private _stay = true; while { _stay && (time < _timer) } do { _plane setPosASL _pos; _plane setVelocity [0,0,0]; doStop _plane; _plane stop true; _plane forceSpeed 0; _plane disableAI "MOVE"; sleep .001; _stay = if (!(_plane getVariable "Stayput") || (player in _plane)) then {false} else {true}; }; _plane setVariable ["BrakesRon",false,true]; _plane setVariable ["Stayput",false,true]; (vehicle _plane) forceSpeed -1; (vehicle _plane) enableAI "MOVE"; This is for Turning the plane on deck to taxi to launching spot: params ["_plane","_dir"]; if (_dir < 0) then { _dir = _dir + 360; } else { if (_dir >= 360) then {_dir = _dir - 360;}; }; private _turning = true; while {_turning} do { private _planeDir = (round _dir - round (getDir _plane)); if (_planeDir < 0) then { _planeDir = _planeDir + 360; } else { if (_planeDir >= 360) then {_planeDir = _planeDir - 360;}; }; if (speed _plane > 0) then {_plane setVelocity [0,0,0]}; private _dirAdj = if (_planeDir < 180) then {1} else {-1}; private _speedturn = if (_planeDir >= 5) then {3} else {1}; private _dirSet = ((getDir _plane) + (_dirAdj * _speedturn)); if (_dirSet < 0) then { _dirSet = _dirSet + 360; } else { if (_dirSet >= 360) then {_dirSet = _dirSet - 360;}; }; _plane setDir _dirSet; _turning = if (ceil (getDir _plane) == ceil _dir || floor (getDir _plane) == floor _dir) then {false} else {true}; sleep .001; }; This script sends the plane to Launch position: params ["_plane","_CarrierPart","_CarrierPartCfgCatapult","_mCfgCatapultMemPnt","_Catapult_pos","_carrier"]; (vehicle _plane) forceSpeed 0; (vehicle _plane) disableAI "ALL"; _pos = (ATLtoASL (_plane getPos [24,getDir _plane])); _reldirC = _plane getDir _pos; [_plane,_reldirC] call UssF_fnc_USS_Freedom_AP_turn; [_plane,_pos,_CarrierPart,_reldirC] call UssF_fnc_USS_Freedom_GoPark; _reldir = _plane getDir _Catapult_pos; [_plane,_reldir] call UssF_fnc_USS_Freedom_AP_turn; [_plane,_CarrierPart,_mCfgCatapultMemPnt,_reldir] call UssF_fnc_USS_Freedom_Go_attach_Cat; waitUntil {_plane distance2D _Catapult_pos < 3}; _plane setPosWorld _Catapult_pos; (vehicle _plane) forceSpeed -1; (vehicle _plane) enableAI "ALL"; _CarrierPartanimations = getArray (_CarrierPartCfgCatapult >> "animations"); [_CarrierPart, _CarrierPartanimations, 10] spawn BIS_fnc_Carrier01AnimateDeflectors; [_plane,_Catapult_pos,_CarrierPart,_CarrierPartanimations] spawn { params ["_plane","_Catapult_pos","_CarrierPart","_CarrierPartanimations"]; waitUntil {!(isTouchingGround _plane)}; [_CarrierPart, _CarrierPartanimations, 0] spawn BIS_fnc_Carrier01AnimateDeflectors; }; This is the init that gets it started: if !(isServer) exitWith {hint"notServer"}; UssF_fnc_USS_Freedom_Brakes = compile preprocessFileLineNumbers "CarCom\fn_USS_Freedom_Brakes.sqf"; publicVariable "UssF_fnc_USS_Freedom_Brakes"; UssF_fnc_USS_Freedom_AP_turn = compile preprocessFileLineNumbers "CarCom\fn_USS_Freedom_AP_turn.sqf"; publicVariable "UssF_fnc_USS_Freedom_AP_turn"; UssF_fnc_USS_Freedom_Go_attach_Cat = compile preprocessFileLineNumbers "CarCom\fn_USS_Freedom_Go_attach_Cat.sqf"; publicVariable "UssF_fnc_USS_Freedom_Go_attach_Cat"; UssF_fnc_USS_Freedom_GoCat = compile preprocessFileLineNumbers "CarCom\fn_USS_Freedom_GoCat.sqf"; publicVariable "UssF_fnc_USS_Freedom_GoCat"; UssF_fnc_USS_Freedom_Luanch = compile preprocessFileLineNumbers "CarCom\fn_USS_Freedom_Luanch.sqf"; publicVariable "UssF_fnc_USS_Freedom_Luanch"; UssF_fnc_USS_Freedom_Luanch_Prep = compile preprocessFileLineNumbers "CarCom\fn_USS_Freedom_Luanch_Prep.sqf"; publicVariable "UssF_fnc_USS_Freedom_Luanch_Prep"; UssF_fnc_USS_Freedom_GoPark = compile preprocessFileLineNumbers "CarCom\fn_USS_Freedom_GoPark.sqf"; publicVariable "UssF_fnc_USS_Freedom_GoPark"; UssF_fnc_USS_Freedom_Deck_control = compile preprocessFileLineNumbers "CarCom\fn_USSFreedom_Deckcontrol.sqf"; publicVariable "UssF_fnc_USS_Freedom_Deck_control"; hint "please wait"; waitUntil {time > 1}; _allAirports = allAirports; _airport = ((_allAirports select 1) select 0); _planes = nearestObjects [carrier1, ["Plane"], 500]; _hulls = nearestObjects [carrier1, ["Land_Carrier_01_hull_04_1_F","Land_Carrier_01_hull_04_F","Land_Carrier_01_hull_07_1_F","Land_Carrier_01_hull_07_F"], 500]; _hullsTypes = []; { _hullsTypes pushBack (typeOf _x); } forEach _hulls; _planesFront = []; _frontParking = []; _planesBack = []; _backParking = []; { private _plane = _x; _plane animate ["wing_fold_l", 1]; _plane animate ["wing_fold_r", 1]; if ((_plane distance carrier1) < 100) then { _planesFront pushBack _plane; _frontParking pushBack (getPosWorld _plane); } else { _planesBack pushBack _plane; _backParking pushBack (getPosWorld _plane); }; } forEach _planes; sleep 4; [_planesFront,_hullsTypes,carrier1,_airport] spawn { params ["_planesFront","_hullsTypes","_carrier","_airport"]; { _plane = vehicle _x; if ({alive _x}count (crew _plane) == 0) then {createVehicleCrew _x}; _plane engineOn false; _plane setVariable ["Stayput",true,true]; [_plane,4] spawn UssF_fnc_USS_Freedom_Brakes; sleep 4; [_plane,_hullsTypes,_carrier] call UssF_fnc_USS_Freedom_Deck_control; sleep 11 + (round (random 21)); _plane assignToAirport _airport; } forEach _planesFront; }; sleep 3 + random 4; [_planesBack,_hullsTypes,carrier1,_airport] spawn { params ["_planesBack","_hullsTypes","_carrier","_airport"]; { _plane = vehicle _x; if ({alive _x}count (crew _plane) == 0) then {createVehicleCrew _x}; _plane engineOn false; _plane setVariable ["Stayput",true,true]; [_plane,4] spawn UssF_fnc_USS_Freedom_Brakes; sleep 4; [_plane,_hullsTypes,_carrier] call UssF_fnc_USS_Freedom_Deck_control; sleep 14 + (round (random 18)); _plane assignToAirport _airport; } forEach _planesBack; }; sleep 240; { player setPosWorld _x; sleep 14; } forEach (_frontParking + _backParking); This is the mission I use for the scripts: Testing AI Launching and taxiing Still haven't worked on Landing and taxiing to parking spots, but smoothed up the Taxiing and Launching a good bit. It also Launches 2 planes at staggered time intervals. Feel free to use, edit, and share how you want. My only stipulation is. If you find a better way, or something that will help other learn. SHARE your findings here. So that others may be able to learn and help the community. Some of the scripts above are edited from BIS original scripts.
  6. Does anybody know how to make AI pilots level out Flaps, rudders and anything else on the jets so it will take off straight?
  7. Looks like we are working through the next few weekends. So progress will be slowed down. :/
  8. AI Taxi and taking off... No landing yet. I haven't messed with this sense idk end of may or June. An update broke most of my scripts so I'm rewriting this. The link above has a sample mission for planes taxiing and taking off. No landings or taxiing for landing in it yet. If I get more spare time I'll see what I can do.
  9. https://www.dropbox.com/s/cfhhjuysh6672ud/FreedomnewlaunchCarCom.Tanoa.rar?dl=0 This is a sample mission for planes taxiing and taking off. NO Taxiing for landings yet. The old scripts I had is either broken on dev branch or broken from updates. So I'm rewriting.
  10. There are several mods that do this, AISS, FOA, ASR, Bcombat(I Think),Gods of War, hetman and Vcom. Gods of War and Hetman probably are the top tier. Its been a while sense I've made or messed with any mods. Maybe someone else will comment that's been using these the last year or so.
  11. I'm not sure if its useful, But if you guys want to use my Airborne scripts from my airborne mod for this. Feel free. Not that you need any help, but thought I'd offer incase. ;)
  12. Thanks. Didn't think of using a cone. Nice one! I'd bet there is much easier ways to get them to land and park than I have written too. lol
  13. Disabling AI didn't seem to work. Had to write my own stopplane script to make them do what you see in this video. I'm sharing.
×