Forum Jump :

Author Message

Darkhorse  

I pown brains


Posts: 482
Rank:


Level: Member

Country: us
Location: Tennessee
Occupation:
Age:
In-game name:

 
#1 Posted at 2010-05-11 10:46        
     



This is a LandingCraft-Utility (LCU) addon for ArmA II. It was originally created for ArmA by bk1276 It can carry 45 Passengers, has a max speed of 60mph, (Actually, the speeds in ArmA, and therefor in configs, are in Kilometers, so I am probably wrong on that part) and it flies the flag of Bohemia Interactive.
(Hey, it's better then a white flag!)

It can be found under Blufor-USMC-Ship- "Landing Craft - Utility"

Download Link: http://www.filefront.com/16414883/LandingCraft-Utility_v0.5.rar

:cheers

This post was edited by Darkhorse (2010-05-12 08:41, ago)



"Dulce et decorum est pro patria mori, sed dulcius pro patria vivere, et dulcissimum pro patria bibere. Ergo, bibamus pro salute patriae"


Walter, John & Jane. Traitors then and traitors now.

Author Message


Posts: 20251
Rank:


Level: Super Admin

Country: nl
Location: The Netherlands
Occupation:
Age: 41
In-game name: Foxhound

 
#2 Posted at 2010-05-11 11:27        
     
Thanks for posting your release here, please lave me a message when you have updated the screens ;)
News on the homepage, mirror below:


Visit my family webshop desteigerhoutshop.nl.

Advertisement


Author Message


Posts: 19
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#3 Posted at 2010-05-12 01:00        
     
great job but next update can you like load vehicles just like the c130h can and unload them


Author Message


Posts: 55
Rank:


Level: Member

Country: ch
Location: Near Zurich
Occupation: Police Officer
Age: 51
In-game name:

 
#4 Posted at 2010-05-12 14:02        
     
I'm currently trying to port over the old ArmA example mission for the lcu. It works almost perfect but Utes has very shoal beaches. The LCU is sometimes rejected from the beach, when colliding with the ground. Could you tweak the config in a way the lcu doesn't collide with the ground in shallow waters or is at least not rejected. It should only stop.

Somehow I have the impression the lcu grafic model is not deep enough in the water. On the other hand the collision box around the model goes too deep. I don't know how to fix these things in ArmA2. I only made models for Flightsim some years ago.

This post was edited by blaunarwal (2010-05-12 14:20, ago)


Author Message

Darkhorse  

I pown brains


Posts: 482
Rank:


Level: Member

Country: us
Location: Tennessee
Occupation:
Age:
In-game name:

 
#5 Posted at 2010-05-12 17:09        
     
Yes, I plan on fixing the models depth. It currently skims across the water when at full speed, and looks rather odd when it does this. I'm not exactly sure what's causing the problem with the landing/beaching, but I will investigate.



"Dulce et decorum est pro patria mori, sed dulcius pro patria vivere, et dulcissimum pro patria bibere. Ergo, bibamus pro salute patriae"


Walter, John & Jane. Traitors then and traitors now.

Author Message


Posts: 55
Rank:


Level: Member

Country: ch
Location: Near Zurich
Occupation: Police Officer
Age: 51
In-game name:

 
#6 Posted at 2010-05-13 04:33        
     
I hope you know how to solve this. Theres also a problem when having two or more lcus approaching the beach. They wait for each other. I guess, they have very large collision boundaries. I can place them far away from each other but they still stop and go because of the AI who thinks it's not safe. For a cool storm landing, this has to be overcome. Under fire, all boats would be killed before at the beach now. Maybe we should use some kind of Mandoble scripts he made like aircraft taxi or the helicopter script forcing a unit exactly to do what you want.


Author Message

Mik  



Posts: 4
Rank:


Level: Member

Country: mx
Location:
Occupation:
Age:
In-game name:

 
#7 Posted at 2011-02-07 00:52        
     
I cant attach veics to it (this attach.... on a trig-radio comand), does any one know why?

Thnkx


Author Message


Posts: 37
Rank:


Level: Member

Country: uk
Location:
Occupation: IT Manager
Age:
In-game name:

 
#8 Posted at 2011-02-07 03:33        
     
I'm sure I read somewhere that you can only load troops into it, not vehicles.


Author Message


Posts: 3
Rank:


Level: Member

Country: ca
Location: Saskatchewan
Occupation: Self Employed
Age:
In-game name: Jazzif

 
#9 Posted at 2011-02-08 00:09        
     
# Mik : I cant attach veics to it (this attach.... on a trig-radio comand), does any one know why?

Thnkx

You have to use the vehicle name instead of "this" on a trigger, because "this" is referring to the trigger itself. So ex. tank1 attachTo [lander1,[0,0,.2]]; //Then you have to detach tank1 when you detach it.

That should put the tank nicely on the floor of the lander. It is possible to attach vehicles to the lander though, vehicles of many types. Ive done it a dozen times already with many vehicles.



there she is! clear as day! Let the Russians know im coming this time!

Added 4 minutes later:

# blaunarwal : I hope you know how to solve this. Theres also a problem when having two or more lcus approaching the beach. They wait for each other. I guess, they have very large collision boundaries. I can place them far away from each other but they still stop and go because of the AI who thinks it's not safe. For a cool storm landing, this has to be overcome. Under fire, all boats would be killed before at the beach now. Maybe we should use some kind of Mandoble scripts he made like aircraft taxi or the helicopter script forcing a unit exactly to do what you want.

Use markers to move them not waypoints and set their behavior to careless. Works well for me because i had that very same problem! So like doMove getmarkerpos "markername" or move getmarkerpos "markername". With paypoints they seem to plot differently for some reason but with these commands i get good results.

This post was edited by Jazzif (2011-02-08 00:28, ago)


Author Message


Posts: 37
Rank:


Level: Member

Country: uk
Location:
Occupation: IT Manager
Age:
In-game name:

 
#10 Posted at 2011-02-11 02:28        
     
Oh Wow, you can load vehicles into it then. Perhaps I was thinking of the Landing Craft Air Cushion (LCAC) that doesn't have any transport scripts then.

K.


Author Message


Posts: 27
Rank:


Level: Member

Country: 00
Location:
Occupation:
Age:
In-game name:

 
#11 Posted at 2011-02-13 02:56        
     
*** EDIT 2 May 2011 ***
Now that securing vehicles on deck works precisely as intended, it's possible to jam a big vehicle into that left rear corner of the deck, so the previous implementation of intercepting the "getout" event can just get you crushed between a wall and a tank. I've edited this entry to now simply add a new action to those "in" the LC to "Go to deck", putting them in that left aft corner of the deck instead of tossed overboard. So you have the choice and can avoid being crushed. It's no longer a big deal to be tossed overboard, since the latest A2OA takes a little while longer to drop your gear when you're swimming - you'll always have time to get back in or swim to safety during LC cargo operations.
*********************
*** EDIT 30 Apr 2011 ***
I didn't really get it right the first time, but now, by Jove, I've got it! Vehicle is left on deck where you placed it.
*********************
I have scripts for mooring and loading/unloading cargo on the deck, and to change where the crew gets out. Really makes this LC nice to use!

By default you get tossed overboard, which is okay now but I give you another choice. If the port aft corner of the main deck is clear you can choose the "Go to deck" option and be placed on deck instead of choosing "Get out" and being tossed overboard. If that corner has a tank jammed into it, just jump overboard so you don't get crushed.

Mooring is available when in shallow water or near either of two user defined positions (set in your init.sqf, so they are defined variables by the time the action condition needs them) -- that's nice if, for example, you want to be able to moor beside a carrier and try to drive some vehicles off the lower deck onto the LC (which does work). Mooring just holds the boat in place, because if you accidentally drive into the back wall the boat with a big, heavy piece of armor the boat can be launched backward before the armor is secured. That looks pretty unrealistic, so as far as I'm concerned mooring falls into the category of a realism upgrade.

The "Secure for Transport" action attaches vehicles and people (who aren't already "riding in back", and who aren't in the LC crew spots) that are near the boat onto the deck, and you unsecure them when you're "ready to unload" at your destination location. It all works great. I can post here if you're interested, if these sorts of scripts aren't already in common use (I haven't tried an exhaustive search).

-Stick

Added 15 minutes later:

Heck, I'll go ahead and post. We'll see if this post will be too long...

1) If you need to moor at deep water locations of any kind (near a carrier or at a deep pier or whatever), obtain the x,y coordinates via the usual test unit method (inspect test unit's position in the mission.sqm - beware, positions in the mission.sqm are [x,z,y]). At the beginning of the init.sqf set the user defined variables dockpos and dockpos2, like this:

dockpos = [8994,5385,0];
dockpos2 = [8994,5385,0];

Mooring is available in shallow water (<6m depth as coded), OR if within 20m of the dockpos or dockpos2 position arrays.

2) In each landing craft, add the following to the initialization field:

this setvariable ["moored", false, true]; this setvariable ["attachedobjs", [], true]; this addAction ["Secure for Transport", "sqf\lcattach.sqf", [], 1, false, true,"","(((velocity _target) select 0) < 0.1) and (((velocity _target) select 1) < 0.1) and ((count (_target getvariable ""attachedobjs""))==0) and (({(((vehicle _x) != _target) and (_x != _this))} count (nearestobjects [_target, [""landvehicle"", ""camanbase""], 8]))>0)"]; this addAction ["Ready to Unload", "sqf\lcdetach.sqf", [], 1, false, true,"","(((velocity _target) select 0) < 0.1) and (((velocity _target) select 1) < 0.1) and ((count (_target getvariable ""attachedobjs""))>0)"]; this addaction ["Moor the Boat (disables motor)", "sqf\moorboat.sqf", [], 0, false, true, "", "((((getposatl _target) select 2)<6) or ((_target distance dockpos)<20) or ((_target distance dockpos2)<20)) and (not (_target getvariable ""moored"")) and (((velocity _target) select 0) < 0.1) and (((velocity _target) select 1) < 0.1)"]; this addaction ["Release Moorings (reenables motor)", "sqf\unmoorboat.sqf", [], 0, false, true, "", "(_target getvariable ""moored"")"]; this addaction ["Go to deck", "sqf\lcgotodeck.sqf", [], 0, false, true, "", "_this in (crew _target)"];

This initializes two variables tied to that LC and adds the transport and mooring actions and the "getout" event handler that fixes where you get out of crew positions. The called scripts are, as written here, housed in a subfolder called "sqf". Each script is shown below. The "Secure for Transport" option is *not* supposed to allow you to accidentally attach yourself to the boat (if that happens you're stuck unless someone else can get to the boat and activate the "Ready to Unload" action).

lcattach.sqf contains this code:

_lc = _this select 0;
_caller = _this select 1;
_j = 0;
_lcx = 0;
_lcy = 0;
_lcz = 0;
_objx = 0;
_objy = 0;
_objz = 0;
_dx = 0;
_dy = 0;
_dz = 0;
_nearstuff = nearestobjects [_lc, ["landvehicle", "camanbase"], 8];
//localize format["lcattach: found objects = %1", _nearstuff];
_lc setvariable ["attachedobjs", _nearstuff, true];
for [{_j=0}, {_j<(count _nearstuff)}, {_j=_j+1}] do
{
  _obj = (_nearstuff select _j);
//  localize format["lcattach:  attaching object %1 / %2", _obj, name _obj];
  if (((vehicle _obj) != _lc) and (_obj != _caller)) then {
    _lcpos = (getposatl _lc);
    _lcx = _lcpos select 0;
    _lcy = _lcpos select 1;
    _lcz = _lcpos select 2;
    _lcdir = (getdir _lc);
    _delta = (getdir _obj) - _lcdir;
    _theta = (360 - _lcdir);
    _objpos = (getposatl _obj);
    _objx = _objpos select 0;
    _objy = _objpos select 1;
    _objz = _objpos select 2;

    _dx = ((_objx - _lcx)*cos(_theta)) + ((_objy - _lcy)*sin(_theta));
    _dy = ((_lcx - _objx)*sin(_theta)) + ((_objy - _lcy)*cos(_theta));

    if (_obj iskindof "landvehicle") then {
      _dz = 0;
    } else {
      _dz = _lcz - _objz;
    };
    _obj attachto [_lc, [_dx, _dy, _dz]];
    _obj setdir _delta;
    _obj setpos getpos _obj;
  };
};


lcdetach.sqf contains this code:

_lc = _this select 0;
_j = 0;
_attachedobjs = _lc getvariable "attachedobjs";
for [{_j=0}, {_j<(count _attachedobjs)}, {_j=_j+1}] do
{
  detach (_attachedobjs select _j);
};
_lc setvariable ["attachedobjs", [], true];


lcgotodeck.sqf contains this code:

_veh = _this select 0;
_unit = _this select 1;

if ( (_veh iskindof "lcu") and (_unit in (crew _veh)) ) then {

//this script only pertains to *crew* getting out of a landing craft and going to deck - ignore all other vehicles and slots

unassignvehicle _unit;

_vehdir = (getdir _veh);
_vehpos = getposasl _veh;

_vehx = _vehpos select 0;
_vehy = _vehpos select 1;
_vehz = _vehpos select 2;

_destx = _vehx - (7*cos(430 - _vehdir));
_desty = _vehy - (7*sin(430 - _vehdir));
_destz = _vehz + 1.3;

_unit setposasl [_destx, _desty, _destz];
_unit setdir _vehdir;

};


moorboat.sqf contains this code:

_lc = _this select 0; //assumes the boat's name is the first and only parameter passed into this script
//dockpos and dockpos2 must be defined at mission start, perhaps to be at the edge of a CV's sea level dock or some other designated dock in water deeper than 4m
if (((((getposatl _lc) select 2)<6) or ((_lc distance dockpos)<20) or ((_lc distance dockpos2)<20)) and (not (_lc getvariable "moored")) and (((velocity _lc) select 0) < 0.1) and (((velocity _lc) select 1) < 0.1)) then {
  _lc setvariable ["moored", true, true];
  _mooredpos = (getposasl _lc);
  _mooreddir = (getdir _lc);
  while {(alive _lc) and (_lc getvariable "moored")} do {
    if ((_lc distance _mooredpos)>0.2) then {
      _lc setposasl _mooredpos;
      _lc setvelocity [((velocity _lc) select 0)*0.1, ((velocity _lc) select 1)*0.1, 0];
    };
    if (abs((getdir _lc) - _mooreddir)>2) then {
      _lc setdir _mooreddir;
      _lc setvelocity [((velocity _lc) select 0)*0.1, ((velocity _lc) select 1)*0.1, 0];
    };
    _lc engineon false;
    sleep 0.51;
  };
};


unmoorboat.sqf contains this code:

_lc = _this select 0;
_lc setvariable ["moored", false, true];

And that's it. Try it! (Tested in A2OA with beta patch 77819, BAF/PMC addons, and Namalsk addon.)
-Stick (author of Limited Assets: Isla Duala OA)

This post was edited by Stick_Hogue (2011-05-03 04:31, ago)

-Stick

Author Message

Mik  



Posts: 4
Rank:


Level: Member

Country: mx
Location:
Occupation:
Age:
In-game name:

 
#12 Posted at 2011-02-15 10:17        
     
Works like a charm, nice!!!


Author Message


Posts: 27
Rank:


Level: Member

Country: 00
Location:
Occupation:
Age:
In-game name:

 
#13 Posted at 2011-05-03 04:33        
     
I've updated the scripting in the above post. Now it works precisely, and it's even possible to get multiple vehicles secured to the deck. Plus you have more flexibility in getting out of the boat.
Enjoy!
Stick
http://www.armaholic.com/page.php?id=11243

-Stick

Author Message


Posts: 1
Rank:


Level: Member

Country: it
Location:
Occupation:
Age:
In-game name:

 
#14 Posted at 2013-03-28 15:37        
     
# Jazzif : You have to use the vehicle name instead of "this" on a trigger, because "this" is referring to the trigger itself. So ex. tank1 attachTo [lander1,[0,0,.2]]; //Then you have to detach tank1 when you detach it.

That should put the tank nicely on the floor of the lander. It is possible to attach vehicles to the lander though, vehicles of many types. Ive done it a dozen times already with many vehicles.

It's really nice, but when the AI try to do it the tank will crash on the ramp. How can i order to the AI to low the ramp?


Author Message


Posts: 2
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name: comander5

 
#15 Posted at 2013-06-26 14:43        
     
I was wondering, if I were to make one of these landing craft filled with only AI, what would I type into the init of a waypoint to make one of them lower the ramp?