-
Content Count
3 -
Joined
-
Last visited
-
Medals
Community Reputation
10 GoodAbout Bacomania
-
Rank
Rookie
core_pfieldgroups_3
-
Interests
simulations and related. virtual pilot (FSX using www.fseconomy.com)
-
Occupation
ICT
Profile Information
-
Gender
Male
-
Location
The Netherlands
Contact Methods
-
Biography
lifetime gamer
-
Bacomania changed their profile photo
-
Making towing tractors usefull (for heli/plane moving, including multiplayer support)
Bacomania replied to Bacomania's topic in ARMA 2 & OA : ADDONS - Configs & Scripting
To the moderators: plz feel free to move this entry to the correct section if it's wrong placed. I was in a real hurry to get some sleep while posting it. Gr. Baco -
Making towing tractors usefull (for heli/plane moving, including multiplayer support and even on deck of a carrier ) The towingtractors for moving heli's and planes are made usefull, by placing one trigger in your mission to activate my scripts on all in mission used towingtractors. No need to assign code to individual tractors. The scripts will detect if a player jumps in a towingtractor as driver and will be notified about the option how to tow a heli or plane. Download URL: http://www.megaupload.com/?d=I23Y2OV0 The scripts can of course freely be used and modified by anyone. Make good use of it :bounce3: Here are the plain scripts (if the download isn't working for some reason): They need to be placed in a sub-folder called "AttachToTractor" in your mission. AttachToTractor.sqf //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // AttachToTractor scripts made by Baco // // What does it do? Make towingtractors operational to move planes and heli's anywere on a map, as long as they are present. // How does it work? Jump in towingtractor and position in front of a plane or heli and // head nose to the plane or heli nose within 5 degrees, to get the towing option. // // To make these scripts work, place a trigger in the mission and: // 1) let it trigger repeatable and by anyone // 2) put in the "bedingung" field: vehicle player != player and local player; // 3) put in the "on act." field: myvec = vehicle player; temp = [myvec] execVM "AttachToTractor\AttachToTractor.sqf"; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// if not (local player) exitWith {}; _Tractor = _this select 0; _vectype = typeof _Tractor; _doexit = 1; if(_vectype == "TowingTractor") then { _doexit = 0; }; if(_vectype == "tractor") then { _doexit = 0; }; if(_doexit == 1) exitWith {}; Tractorcargo = 0; _actionadded = 0; _cargo = nil; hint format ["Welcome to %1. Position in front of a plane or heli and head the %1 nose to the plane or heli nose within 5 degrees, to get the towing option.", typeOf _Tractor]; while{ (alive _Tractor) && ((driver _Tractor) == player) } do { if (Tractorcargo == 0) then { _nObject = nearestObject [_Tractor, "Air"]; if not (isNull _nObject) then { if ((_nObject distance _Tractor) > 12) then { _Tractor removeAction actioncargo; _actionadded = 0; _TractorPos = getPosASL _Tractor; //hint format ["Position: x= %1, y= %2, z= %3.", (_TractorPos select 0), (_TractorPos select 1), (_TractorPos select 2)]; //sleep 2; } else { if((_nObject != _cargo) && (_actionadded == 1)) then { _Tractor removeAction actioncargo; _actionadded = 0; }; _TractorPos = getPosASL _Tractor; _TractorDir = getDir _Tractor; _CargoPos = getPosASL _nObject; _CargoDir = getDir _nObject; _TractorHeading = (((_TractorPos select 0) - (_CargoPos select 0)) atan2 ((_TractorPos select 1) - (_CargoPos select 1))); _TractorBearing = _TractorHeading - _CargoDir; if(_TractorBearing > 180) then { _TractorBearing = _TractorBearing - 360; }else{ if(_TractorBearing < -180) then { _TractorBearing = _TractorBearing + 360; } }; _CargoHeading = (((_CargoPos select 0) - (_TractorPos select 0)) atan2 ((_CargoPos select 1) - (_TractorPos select 1))); _CargoBearing = _CargoHeading - _TractorDir; if(_CargoBearing > 180) then { _CargoBearing = _CargoBearing - 360; }else{ if(_CargoBearing < -180) then { _CargoBearing = _CargoBearing + 360; } }; if( ((_TractorBearing > -5) && (_TractorBearing < 5)) && ((_CargoBearing > -5) && (_CargoBearing < 5)) && (_actionadded == 0) ) then { _actionadded = 1; _cargo = _nObject; actioncargo = _Tractor addAction [format ["Tow %1", typeOf _cargo], "AttachToTractor\AttachToTractor_start.sqf", _cargo]; }; }; }; } else { _Tractor removeAction actioncargo; _actionadded = 0; }; sleep 0.1; }; _Tractor removeAction actioncargo; _Tractor removeAction actiondrop; exit; AttachToTractor_start.sqf //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // AttachToTractor scripts made by Baco // // What does it do? Make towingtractors operational to move planes and heli's anywere on a map, as long as they are present. // How does it work? Jump in towingtractor and position in front of a plane or heli and // head nose to the plane or heli nose within 5 degrees, to get the towing option. // // To make these scripts work, place a trigger in the mission and: // 1) let it trigger repeatable and by anyone // 2) put in the "bedingung" field: vehicle player != player and local player; // 3) put in the "on act." field: myvec = vehicle player; temp = [myvec] execVM "AttachToTractor\AttachToTractor.sqf"; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// if not (local player) exitWith {}; _Tractor = _this select 0; _cargo = _this select 3; _Tractor removeAction actioncargo; if( (isNull _cargo) || ((_cargo distance _Tractor) > 12) ) then { Tractorcargo = 0; exit; }; hint format ["Coupling the %1 for towing...", typeOf _cargo]; sleep 1; Tractorcargo = 1; actiondrop = _Tractor addAction [format ["Detach %1", typeOf _cargo], "AttachToTractor\AttachToTractor_stop.sqf", _cargo]; _cargo engineOn false; hint format ["Towing the %1", typeOf _cargo]; _CargoDis = _cargo distance _Tractor; _CargoDamage = GetDammage _cargo; while{ (Tractorcargo == 1) && (alive _Tractor) && (vehicle player == _Tractor)} do { _TractorPos = getPosASL _Tractor; _TractorDir = getDir _Tractor; _cargo setPosASL [(_TractorPos select 0) + (_CargoDis * sin _TractorDir), (_TractorPos select 1) + (_CargoDis * cos _TractorDir), (_TractorPos select 2)]; _cargo setDir (_TractorDir + 180); _cargo SetDammage _CargoDamage; sleep 0.01; }; _Tractor removeAction actiondrop; _TractorPos = getPosASL _Tractor; _TractorDir = getDir _Tractor; _cargo setPosASL [(_TractorPos select 0) + (_CargoDis * sin _TractorDir), (_TractorPos select 1) + (_CargoDis * cos _TractorDir), (_TractorPos select 2)]; _cargo setDir (_TractorDir + 180); _cargo SetDammage _cargoDamage; hint format ["Towing stopped and decoupled the %1", typeOf _cargo]; exit; AttachToTractor_stop.sqf //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // AttachToTractor scripts made by Baco // // What does it do? Make towingtractors operational to move planes and heli's anywere on a map, as long as they are present. // How does it work? Jump in towingtractor and position in front of a plane or heli and // head nose to the plane or heli nose within 5 degrees, to get the towing option. // // To make these scripts work, place a trigger in the mission and: // 1) let it trigger repeatable and by anyone // 2) put in the "bedingung" field: vehicle player != player and local player; // 3) put in the "on act." field: myvec = vehicle player; temp = [myvec] execVM "AttachToTractor\AttachToTractor.sqf"; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// if not (local player) exitWith {}; _Tractor = _this select 0; _cargo = _this select 3; Tractorcargo = 0; exit;
-
Carrier Domination West AI (LHD As Base :) )
Bacomania replied to Alexei Vostrikov's topic in ARMA 2 & OA - USER MISSIONS
Thanks Alexei Vostrikov (and of course all others involved) for this GREAT mission. Last night a few I met on the "Testing Carrier Domination" server were all in a great mood to coordinate and make some fun! Fact is, it got me involved over 8 hours of fun and joy, without being disconnected. Of course we found some quircks during the progress, but most if not all were overcome by repeating the proces (like the auto-rearming not restoring ammo in the end), or getting out and back in a chopper. I think most of the quircks we had were due to lag or network synchro stuff (updates of enemy not fully completed). Think it has nothing to do with the mission itself. While flying I noticed that using the full map is not handy, since it takes a while to reload the 3d views when going back to cockpit and you loose SA (situation awarenes). Most of the time I find myself using the mini-map, being able to steer and check my position. Since the zooming of this mini-map is auto and not zooming out that much, a guidance on the map with markers to find the ship/base would be handy (like a yellow ILS line as a long narrow rectangle as a marker). If you cross the line, visible on the mini-map, at least you can align with it and find the ship/base without being distracted from what it is all about... "flying fun". So far a great mission and looking forward for all updates! Greetings from, Baco