Darkhorse 1-6 16 Posted May 11, 2010 (edited) 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" Mirrors (Thanks Foxhound, Imutep, and Miller!): http://www.filefront.com/16414883/LandingCraft-Utility_v0.5.rar ArmAholic.com Mirror LandingCraft - Utility v0.5 ArmedAssault.info Mirror : DOWNLOAD - LandingCraft - Utility (v.0.5) - [8.3 MB] from ArmedAssault.info ArmA2Base.de Mirror: LandingCraft - Utility v0.5 Edited May 12, 2010 by Darkhorse 1-6 Share this post Link to post Share on other sites
Guest Posted May 11, 2010 Thanks for informing us about the release :cool: Release frontpaged on the Armaholic homepage. Landing Craft - Utility v0.5 Share this post Link to post Share on other sites
rexehuk 16 Posted May 11, 2010 Pretty good! Suggestions at the moment: 1. Make the driver cabin bulletproof 2. Add some shielding to the 50 Cal (to protect lower body) I also found a bug(s) albeit minor: 1. When you die, you seem to have a BI flag through you? 2. Can exit when the flap isn't down etc Other than that, it is a really good addon! Can see myself making a few immense beach landings now. Share this post Link to post Share on other sites
GI-JoE 0 Posted May 11, 2010 Great ! Nice work Darkhorse :) Share this post Link to post Share on other sites
imutep 0 Posted May 11, 2010 Thx for this nice addon! ArmedAssault.info Mirror and News: We have also added this release to your personal author profile If a release or contact information is missing, feel free to drop a PM, it will then be added. And here is the BBCode if you want to add our Mirror to your release post : [url=http://www.armedassault.info/index.php?cat=addons&game=1&id=1385][img=http://www.armedassault.info/mirrorgen2/6135486.gif][/url] If you prefer a text only BBCode please copy and paste the code below : [b]ArmedAssault.info Mirror :[/b] [url=http://www.armedassault.info/index.php?cat=addons&game=1&id=1385]DOWNLOAD - LandingCraft - Utility (v.0.5) - [8.3 MB] from ArmedAssault.info[/url][/spoiler] Share this post Link to post Share on other sites
Cyteless 10 Posted May 11, 2010 Wow, you were quick at releasing this :p Share this post Link to post Share on other sites
RossCrispin 10 Posted May 11, 2010 Awesome, do you know exactly how many people it holds? Share this post Link to post Share on other sites
Darkhorse 1-6 16 Posted May 11, 2010 45, and i plan to make it hold either 2 light vehicles (humvees) or 1 tank, but when it is holding the vehicles no infantry can be in it. Share this post Link to post Share on other sites
rexehuk 16 Posted May 11, 2010 45, and i plan to make it hold either 2 light vehicles (humvees) or 1 tank, but when it is holding the vehicles no infantry can be in it. Don't talk! CODE!!! This sounds like a really nice addon man, wish you the best with it. Share this post Link to post Share on other sites
miller 49 Posted May 11, 2010 Thanks Darkhorse 1-6 ArmA2Base.de Mirror: LandingCraft - Utility v0.5 Kind regards Miller Share this post Link to post Share on other sites
Darkhorse 1-6 16 Posted May 12, 2010 First post updated with new pictures (Thanks Ballistic!) and mirrors, along with a brief description. Pretty good!Suggestions at the moment: 1. Make the driver cabin bulletproof 2. Add some shielding to the 50 Cal (to protect lower body) I also found a bug(s) albeit minor: 1. When you die, you seem to have a BI flag through you? 2. Can exit when the flap isn't down etc Other than that, it is a really good addon! Can see myself making a few immense beach landings now. Suggestions: #1 - I may end up opening up the drivers cabin, considering right now there isn't actually a door, so i don't know how he gets in. :D #2 - Planned. Bugs: #1 - This may not be fixable. #2 - Easily fixed, i would think. Will look into it. Share this post Link to post Share on other sites
fludblud 10 Posted May 15, 2010 big bug, flap doesnt go down when AI is transporting troops so when they start exiting they climb over the raised flap only to fall to their deaths :S Share this post Link to post Share on other sites
mankyle 410 Posted May 15, 2010 put in the unload waypoint or in the trigger or wherever you give the "dogetout" command the following line "name of the LCU" animate ["lcuramp",1]; for closing it would be: "name of the LCU" animate ["lcuramp",0]; BTW if you edit Norrin's excellent attachto scripts, you can use the ones of the C130 Hercules to load cars in the LCUs http://norrin.org/downloads/ArmA2/attachTo/Hercules01.utes.rar I have edited the scripts so the vehicles are correctly loaded and unloaded: Edited mount_vcl.sqf // mount_vcl.sqf // © JUNE 2009 - norrin (norrin@iinet.net.au) _vcl = _this select 0; _caller = _this select 1; _typeOfVcl = _this select 3; _dir = getdir _vcl; _mountVcl = objNull; _blogs = 0; _c = 0; if (count nearestObjects [player, [_typeOfVcl], 30] > 0) then { _mountVcl = nearestObjects [player, [_typeOfVcl], 30] select 0; }; if (vehicle _caller != _caller) then {_caller action ["GetOut", vehicle _caller]; sleep 1}; if (!((_vcl getVariable "NORRN_mountOn_vcl_pos0") select 0)) then { _vcl animate ["lcuramp",1]; sleep 4; _mountVcl attachTo [_vcl,[0,0,0]]; sleep 0.1; _vcl setVariable ["NORRN_mountOn_vcl_pos0", [true, _mountVcl], true]; _vcl animate ["lcuramp",0]; }; if (true) exitWith {}; edited dismount_vcl.sqf // dismount_vcl.sqf // © JUNE 2009 - norrin (norrin@iinet.net.au) _vcl = _this select 0; _caller = _this select 1; _mountVcl = (_vcl getVariable "NORRN_mountOn_vcl_pos0") select 1; _vclDir = getDir _vcl; if (vehicle player == player) then { _vcl animate ["lcuramp",1]; sleep 4; detach _mountVcl; _mountVcl setPos [(getPos _vcl select 0) + (15 * sin _vclDir), (getPos _vcl select 1) + (15 * cos _vclDir), 0]; _vcl setVariable ["NORRN_mountOn_vcl_pos0", [false, objNull], true]; _vcl animate ["lcuramp",0]; }; if (true) exitWith {}; overwrite Norrin's scripts with these and substitute the Hercules in Norrin's demo mission for a LCU. If you load a vehicle, the ramp will go down, the vehicle will be loaded in the LCU and the ramp will close. The same for unloading, ramp will go down, vehicle will be unloaded and ramp will go up BTW, that Royal Sahrani Marines Leopard looks terrific!!!! Share this post Link to post Share on other sites
vengeance1 50 Posted May 15, 2010 Works great mankyle, thanks!;) Share this post Link to post Share on other sites
Darkhorse 1-6 16 Posted May 15, 2010 (edited) Holy Crap! I've been swamped with RL lately, but planned to get to the script in the next 3 days or so. *Edit* I am going to see what can be adapted from your version of the script, to change the C-130 Cargo script that is included with NZDFCrash's C-130s. Edited May 15, 2010 by Darkhorse 1-6 Share this post Link to post Share on other sites
mankyle 410 Posted May 16, 2010 It's not my script, It's Norrin's. I merely changed a couple of lines so the vehicles would be moved in front of the LCUs and the ramp would be synchronized Anyway, keep up the good work, darkhorse BTW, when you finish the script, don't forget to add instructions in the readme so people knows what to put in a WP so the AI vehicles are automatically loaded in the LCU RACS rocks!!!!! Sorry for the bad joke, guys Share this post Link to post Share on other sites
Darkhorse 1-6 16 Posted May 16, 2010 It's not my script, It's Norrin's. I merely changed a couple of lines so the vehicles would be moved in front of the LCUs and the ramp would be synchronizedAnyway, keep up the good work, darkhorse BTW, when you finish the script, don't forget to add instructions in the readme so people knows what to put in a WP so the AI vehicles are automatically loaded in the LCU RACS rocks!!!!! Sorry for the bad joke, guys I know it's Norrins. I got permission to use the newer version of his script that's built into Crash's C-130s, I just haven't had much time to convert it to the LCU. What you did should make that process alot easier. thanks! Oh, thanks for reminding me about the instructions, I'll make sure I add them in for the update. Share this post Link to post Share on other sites
ker8er0s 10 Posted May 17, 2010 re: the flag bug. If you're using attachto command then the best way to attach it to the vehicle would be to identify the vehicle instead of the driver. (bear in mind this is writtin roughly) _boat = assignedvehicle (put name of boat here without brackets); flag attachto [_boat,[0,0,1]]; that might work. Share this post Link to post Share on other sites
jhebbel 10 Posted June 14, 2010 (edited) hey yall, first time in this forum posting so i figured id start it with a contribution instead of a question ;-) here is a quick bit that automaticallly checks if the LCU has approached a shoreline and then opens ramp, and tells vehicles to drive off... _ship = _this select 0; _vehicleA = _this select 1; _pos = _this select 2; if (_pos == "FRONT") then { _vehicleA attachTo [_ship,[0,3,.1]]; }; if (_pos == "CENTER") then { _vehicleA attachTo [_ship,[0,0,.1]]; }; if (_pos == "BACK") then { _vehicleA attachTo [_ship,[0,(-3),.1]]; }; while {(alive _ship) and (surfaceIsWater [(getpos _ship select 0) + sin(getdir _ship)*10, (getpos _ship select 1) + cos(getdir _ship)*10])} do {sleep (.5);}; _ship animate ["lcuramp",1]; detach _vehicleA; _vehicleA move [(getpos _ship select 0) + sin(getdir _ship)*60, (getpos _ship select 1) + cos(getdir _ship)*60]; execute as normal with nul [MyLCU,MyTruck,"CENTER"] execvm "LCUMOUNT.sqf"; so now when you have ur LCU approach a beach head it will automatically know when its close to shore and lower the ramp and have the vehicled drive off rather than teleport off like ive seen some do. tweek the *x multiplication value after the sin and cos to play with the range for beach and vehicles drive off waypoint. I just got this game about a week ago and have been enjoying coding as soon as i got it, im not the best at this yet but i have spent years in doftware design so i alwayse enjoy writing code so if anybody wants help or has questions feel free to ask. **EDIT** Afterthought, u may want to localize the variables so u can have this on multiple ships with out them messin with eachother, you may also want to add a force exit if this is not run by server for fome reason to avoid multiple copies running for each ship, im sure most of yall know that but thats just for yall copy and pasters out there ;-) ohh and change the while to a waituntil, uses less resourses i believe. sorry things keep poppin in my head after each cup of coffee ;-) **After 3 cups of coffee yet another edit** ok this code has it all, since the AI is too retarded to make it all the way to the beach on there own, this script will force them to beach the ship once they are close enough, then force the vehicles to drive out, and then force the ship to back off the shore so it can be used again.. You can pass either 1 or 2 vehicles to be used and the script will position them accordingly (dont expect to fit 2 7k's or 2 tanks). Newest ver. allows dynamic creation of vehicles and crew, when calling the script just put the class name of the vehicles in "" instead of the object name of a current vehicle and it will create the vehicle and occupy it with gunners and drivers automatically. !!! YOU MUST HAVE A DEADZONE MARKER FOR THIS, I use deadzone markers in the middle of nowhere on my map to create my units at then move to final position only once fully ready. Just place a marker on ur map named "WEST_deadspace", i seperate my east and west so they dont kill eachother while spawning. Using this script you can have code inside a move waypoint at ur LHD for ur LVU that will place vehicles inside it then have it move to the beach and unload its cargo then cycle back to the LHD and do it over and over, just init what u want into ur LVU for your first trip, make waypoint 1 a move thats 20 or so meters inland from the shore, dont worry the script takes over control of the LVU once close enough, then have another move wp back at the LHD with the same code inside it then a Cycle wp after that and your LVU will make trips back and forth until it dies. I use this on my large maps to push reinforcements into a beachhead that i establish early on to sopport opperations elsewhere on the map. ////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: Wobbles ////////////////////////////////////////////////////////////////// if (!isServer) exitWith {}; private ["_ship","_vehicleA","_vehicleB","_shipVel","_shipPOS","_shipDIR","_shipVelSlow","_shipVelNormal","_GetOutVel"]; _ship = _this select 0; _vehicleA = _this select 1; _vehicleB = _this select 2; _PatrolGrid = _this select 3; //Less CPU clutter sleep random 5; //Dynamic spot 1 if (typeName _vehicleA=="String") then { _MyUnit = ["USMC_Soldier_SL","USMC_Soldier_TL","USMC_Soldier_TL","USMC_Soldier_TL","USMC_Soldier_Medic","USMC_Soldier_AT","USMC_Soldier_MG","USMC_Soldier_AR","USMC_Soldier_GL","USMC_Soldier_AA","USMC_Soldier_HAT","USMC_Soldier","USMC_Soldier"]; _vehicleA = _vehicleA createVehicle getmarkerpos "WEST_deadspace"; _groupA = creategroup side driver _ship; sleep 1; if (_vehicleA emptypositions "Driver" != 0) then { _groupTemp = creategroup side driver _ship; _unit = _MyUnit select (floor (random (count _MyUnit))) createunit [getmarkerpos "WEST_deadspace", _groupTemp, ""]; units _groupTemp select 0 assignasdriver _vehicleA; units _groupTemp select 0 moveindriver _vehicleA; units _groupTemp joinsilent _groupA; }; if (_vehicleA emptypositions "Gunner" != 0) then { _groupTemp = creategroup side driver _ship; _unit = _MyUnit select (floor (random (count _MyUnit))) createunit [getmarkerpos "WEST_deadspace", _groupTemp, ""]; units _groupTemp select 0 assignasgunner _vehicleA; units _groupTemp select 0 moveingunner _vehicleA; units _groupTemp joinsilent _groupA; }; if (_vehicleA emptypositions "Commander" != 0) then { _groupTemp = creategroup side driver _ship; _unit = _MyUnit select (floor (random (count _MyUnit))) createunit [getmarkerpos "WEST_deadspace", _groupTemp, ""]; units _groupTemp select 0 assignasCommander _vehicleA; units _groupTemp select 0 moveinCommander _vehicleA; units _groupTemp joinsilent _groupA; }; _groupA setcombatmode "BLUE"; }; //Dynamic spot 2 if (typeName _vehicleB=="String") then { _MyUnit = ["USMC_Soldier_SL","USMC_Soldier_TL","USMC_Soldier_TL","USMC_Soldier_TL","USMC_Soldier_Medic","USMC_Soldier_AT","USMC_Soldier_MG","USMC_Soldier_AR","USMC_Soldier_GL","USMC_Soldier_AA","USMC_Soldier_HAT","USMC_Soldier","USMC_Soldier"]; _vehicleB = _vehicleB createVehicle getmarkerpos "WEST_deadspace"; _groupB = creategroup side driver _ship; sleep 1; if (_vehicleB emptypositions "Driver" != 0) then { _groupTemp = creategroup side driver _ship; _unit = _MyUnit select (floor (random (count _MyUnit))) createunit [getmarkerpos "WEST_deadspace", _groupTemp, ""]; units _groupTemp select 0 assignasdriver _vehicleB; units _groupTemp select 0 moveindriver _vehicleB; units _groupTemp joinsilent _groupB; }; if (_vehicleB emptypositions "Gunner" != 0) then { _groupTemp = creategroup side driver _ship; _unit = _MyUnit select (floor (random (count _MyUnit))) createunit [getmarkerpos "WEST_deadspace", _groupTemp, ""]; units _groupTemp select 0 assignasgunner _vehicleB; units _groupTemp select 0 moveingunner _vehicleB; units _groupTemp joinsilent _groupB; }; if (_vehicleB emptypositions "Commander" != 0) then { _groupTemp = creategroup side driver _ship; _unit = _MyUnit select (floor (random (count _MyUnit))) createunit [getmarkerpos "WEST_deadspace", _groupTemp, ""]; units _groupTemp select 0 assignasCommander _vehicleB; units _groupTemp select 0 moveinCommander _vehicleB; units _groupTemp joinsilent _groupB; }; _groupB setcombatmode "BLUE"; }; sleep 1; //Determine if we are using 1 or 2 vehicles if ((_vehicleB == objnull) or (isnil "_vehicleB")) then { driver _VehicleA disableAI "Move"; _vehicleA attachTo [_ship,[0,-1,.1]]; nul = [leader group driver _vehicleA,_PatrolGrid,"NOWAIT"] execVM "AI\UPS.sqf"; } else { driver _VehicleA disableAI "Move"; driver _VehicleB disableAI "Move"; _vehicleA attachTo [_ship,[0,3,.1]]; _vehicleB attachTo [_ship,[0,(-3),.1]]; nul = [leader group driver _vehicleA,_PatrolGrid,"NOWAIT"] execVM "AI\UPS.sqf"; nul = [leader group driver _vehicleB,_PatrolGrid,"NOWAIT"] execVM "AI\UPS.sqf"; }; //Wait until we are about 70m from shoreline then suck us in while {(alive _ship) and (surfaceIsWater [(getpos _ship select 0) + sin(getdir _ship)*70, (getpos _ship select 1) + cos(getdir _ship)*70])} do {sleep (.5);}; //Get the speed the ship is approachin the shore at so we can keep this constant and natural looking _shipVel = velocity _ship; //Tell the ship driver to shut up and wait driver _ship disableai "MOVE"; //Keep forcing the ship to the shoreline until we are 12m form the shore (our launching distance) while {(alive _ship) and (surfaceIsWater [(getpos _ship select 0) + sin(getdir _ship)*12, (getpos _ship select 1) + cos(getdir _ship)*12])} do { _ship setvelocity _shipVel; sleep (.5); }; //open ramp _ship animate ["lcuramp",1]; //bring ship to complete stop slowely so it looks like were beached while {((velocity _ship select 0) > .5) or ((velocity _ship select 1) > .5)} do { _ship setvelocity [((velocity _ship select 0) * .5),((velocity _ship select 1) * .5),((velocity _ship select 2) * .5)]; sleep (.2); }; _ship setvelocity [0,0,0]; sleep 2; //Get the heck out detach _vehicleA; _GetOutVel = [sin(getdir _ship)*3,cos(getdir _ship)*3,0]; while {_ship distance _vehicleA < 14} do {_vehicleA setvelocity [sin(getdir _ship)*2,cos(getdir _ship)*2,(velocity _vehicleB select 2)*1.5];sleep (.05);}; driver _VehicleA EnableAI "Move"; group driver _VehicleA setcombatmode "RED"; detach _vehicleB; _GetOutVel = [sin(getdir _ship)*3,cos(getdir _ship)*3,0]; while {_ship distance _vehicleB < 14} do {_vehicleB setvelocity [sin(getdir _ship)*2,cos(getdir _ship)*2,(velocity _vehicleB select 2)*1.5];sleep (.05);}; driver _VehicleB EnableAI "Move"; group driver _VehicleB setcombatmode "RED"; sleep 10; //close the ramp and push back from the shore cus ai are too stupid to do this themselves so we can send the ship elsewhere _ship animate ["lcuramp",0]; _shipVelSlow = [(_shipVel select 0) / -3, (_shipVel select 1) / -3,(_shipVel select 2) / -3]; _shipVelNormal = [(_shipVel select 0) / -2, (_shipVel select 1) / -2,(_shipVel select 2) / -2]; while {(alive _ship) and !(surfaceIsWater [(getpos _ship select 0) + sin(getdir _ship)*15, (getpos _ship select 1) + cos(getdir _ship)*15])} do { _ship setvelocity _shipVelSlow; sleep (.5); }; while {(alive _ship) and !(surfaceIsWater [(getpos _ship select 0) + sin(getdir _ship)*30, (getpos _ship select 1) + cos(getdir _ship)*30])} do { _ship setvelocity _shipVelNormal; sleep (.5); }; //ok, give the AI his brains back driver _ship EnableAI "Move"; Edited June 14, 2010 by jhebbel afterthought Share this post Link to post Share on other sites
Fox '09 14 Posted September 12, 2010 darkhorse is having lots of fun irl right now , as he said on steam. was really looking forward to an update Share this post Link to post Share on other sites
CaptainBravo 0 Posted September 13, 2010 hey yall, first time in this forum posting so i figured id start it with a contribution instead of a question ;-)here is a quick bit that automaticallly checks if the LCU has approached a shoreline and then opens ramp, and tells vehicles to drive off... _ship = _this select 0; _vehicleA = _this select 1; _pos = _this select 2; if (_pos == "FRONT") then { _vehicleA attachTo [_ship,[0,3,.1]]; }; if (_pos == "CENTER") then { _vehicleA attachTo [_ship,[0,0,.1]]; }; if (_pos == "BACK") then { _vehicleA attachTo [_ship,[0,(-3),.1]]; }; while {(alive _ship) and (surfaceIsWater [(getpos _ship select 0) + sin(getdir _ship)*10, (getpos _ship select 1) + cos(getdir _ship)*10])} do {sleep (.5);}; _ship animate ["lcuramp",1]; detach _vehicleA; _vehicleA move [(getpos _ship select 0) + sin(getdir _ship)*60, (getpos _ship select 1) + cos(getdir _ship)*60]; execute as normal with nul [MyLCU,MyTruck,"CENTER"] execvm "LCUMOUNT.sqf"; so now when you have ur LCU approach a beach head it will automatically know when its close to shore and lower the ramp and have the vehicled drive off rather than teleport off like ive seen some do. tweek the *x multiplication value after the sin and cos to play with the range for beach and vehicles drive off waypoint. I just got this game about a week ago and have been enjoying coding as soon as i got it, im not the best at this yet but i have spent years in doftware design so i alwayse enjoy writing code so if anybody wants help or has questions feel free to ask. **EDIT** Afterthought, u may want to localize the variables so u can have this on multiple ships with out them messin with eachother, you may also want to add a force exit if this is not run by server for fome reason to avoid multiple copies running for each ship, im sure most of yall know that but thats just for yall copy and pasters out there ;-) ohh and change the while to a waituntil, uses less resourses i believe. sorry things keep poppin in my head after each cup of coffee ;-) **After 3 cups of coffee yet another edit** ok this code has it all, since the AI is too retarded to make it all the way to the beach on there own, this script will force them to beach the ship once they are close enough, then force the vehicles to drive out, and then force the ship to back off the shore so it can be used again.. You can pass either 1 or 2 vehicles to be used and the script will position them accordingly (dont expect to fit 2 7k's or 2 tanks). Newest ver. allows dynamic creation of vehicles and crew, when calling the script just put the class name of the vehicles in "" instead of the object name of a current vehicle and it will create the vehicle and occupy it with gunners and drivers automatically. !!! YOU MUST HAVE A DEADZONE MARKER FOR THIS, I use deadzone markers in the middle of nowhere on my map to create my units at then move to final position only once fully ready. Just place a marker on ur map named "WEST_deadspace", i seperate my east and west so they dont kill eachother while spawning. Using this script you can have code inside a move waypoint at ur LHD for ur LVU that will place vehicles inside it then have it move to the beach and unload its cargo then cycle back to the LHD and do it over and over, just init what u want into ur LVU for your first trip, make waypoint 1 a move thats 20 or so meters inland from the shore, dont worry the script takes over control of the LVU once close enough, then have another move wp back at the LHD with the same code inside it then a Cycle wp after that and your LVU will make trips back and forth until it dies. I use this on my large maps to push reinforcements into a beachhead that i establish early on to sopport opperations elsewhere on the map. ////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: Wobbles ////////////////////////////////////////////////////////////////// if (!isServer) exitWith {}; private ["_ship","_vehicleA","_vehicleB","_shipVel","_shipPOS","_shipDIR","_shipVelSlow","_shipVelNormal","_GetOutVel"]; _ship = _this select 0; _vehicleA = _this select 1; _vehicleB = _this select 2; _PatrolGrid = _this select 3; //Less CPU clutter sleep random 5; //Dynamic spot 1 if (typeName _vehicleA=="String") then { _MyUnit = ["USMC_Soldier_SL","USMC_Soldier_TL","USMC_Soldier_TL","USMC_Soldier_TL","USMC_Soldier_Medic","USMC_Soldier_AT","USMC_Soldier_MG","USMC_Soldier_AR","USMC_Soldier_GL","USMC_Soldier_AA","USMC_Soldier_HAT","USMC_Soldier","USMC_Soldier"]; _vehicleA = _vehicleA createVehicle getmarkerpos "WEST_deadspace"; _groupA = creategroup side driver _ship; sleep 1; if (_vehicleA emptypositions "Driver" != 0) then { _groupTemp = creategroup side driver _ship; _unit = _MyUnit select (floor (random (count _MyUnit))) createunit [getmarkerpos "WEST_deadspace", _groupTemp, ""]; units _groupTemp select 0 assignasdriver _vehicleA; units _groupTemp select 0 moveindriver _vehicleA; units _groupTemp joinsilent _groupA; }; if (_vehicleA emptypositions "Gunner" != 0) then { _groupTemp = creategroup side driver _ship; _unit = _MyUnit select (floor (random (count _MyUnit))) createunit [getmarkerpos "WEST_deadspace", _groupTemp, ""]; units _groupTemp select 0 assignasgunner _vehicleA; units _groupTemp select 0 moveingunner _vehicleA; units _groupTemp joinsilent _groupA; }; if (_vehicleA emptypositions "Commander" != 0) then { _groupTemp = creategroup side driver _ship; _unit = _MyUnit select (floor (random (count _MyUnit))) createunit [getmarkerpos "WEST_deadspace", _groupTemp, ""]; units _groupTemp select 0 assignasCommander _vehicleA; units _groupTemp select 0 moveinCommander _vehicleA; units _groupTemp joinsilent _groupA; }; _groupA setcombatmode "BLUE"; }; //Dynamic spot 2 if (typeName _vehicleB=="String") then { _MyUnit = ["USMC_Soldier_SL","USMC_Soldier_TL","USMC_Soldier_TL","USMC_Soldier_TL","USMC_Soldier_Medic","USMC_Soldier_AT","USMC_Soldier_MG","USMC_Soldier_AR","USMC_Soldier_GL","USMC_Soldier_AA","USMC_Soldier_HAT","USMC_Soldier","USMC_Soldier"]; _vehicleB = _vehicleB createVehicle getmarkerpos "WEST_deadspace"; _groupB = creategroup side driver _ship; sleep 1; if (_vehicleB emptypositions "Driver" != 0) then { _groupTemp = creategroup side driver _ship; _unit = _MyUnit select (floor (random (count _MyUnit))) createunit [getmarkerpos "WEST_deadspace", _groupTemp, ""]; units _groupTemp select 0 assignasdriver _vehicleB; units _groupTemp select 0 moveindriver _vehicleB; units _groupTemp joinsilent _groupB; }; if (_vehicleB emptypositions "Gunner" != 0) then { _groupTemp = creategroup side driver _ship; _unit = _MyUnit select (floor (random (count _MyUnit))) createunit [getmarkerpos "WEST_deadspace", _groupTemp, ""]; units _groupTemp select 0 assignasgunner _vehicleB; units _groupTemp select 0 moveingunner _vehicleB; units _groupTemp joinsilent _groupB; }; if (_vehicleB emptypositions "Commander" != 0) then { _groupTemp = creategroup side driver _ship; _unit = _MyUnit select (floor (random (count _MyUnit))) createunit [getmarkerpos "WEST_deadspace", _groupTemp, ""]; units _groupTemp select 0 assignasCommander _vehicleB; units _groupTemp select 0 moveinCommander _vehicleB; units _groupTemp joinsilent _groupB; }; _groupB setcombatmode "BLUE"; }; sleep 1; //Determine if we are using 1 or 2 vehicles if ((_vehicleB == objnull) or (isnil "_vehicleB")) then { driver _VehicleA disableAI "Move"; _vehicleA attachTo [_ship,[0,-1,.1]]; nul = [leader group driver _vehicleA,_PatrolGrid,"NOWAIT"] execVM "AI\UPS.sqf"; } else { driver _VehicleA disableAI "Move"; driver _VehicleB disableAI "Move"; _vehicleA attachTo [_ship,[0,3,.1]]; _vehicleB attachTo [_ship,[0,(-3),.1]]; nul = [leader group driver _vehicleA,_PatrolGrid,"NOWAIT"] execVM "AI\UPS.sqf"; nul = [leader group driver _vehicleB,_PatrolGrid,"NOWAIT"] execVM "AI\UPS.sqf"; }; //Wait until we are about 70m from shoreline then suck us in while {(alive _ship) and (surfaceIsWater [(getpos _ship select 0) + sin(getdir _ship)*70, (getpos _ship select 1) + cos(getdir _ship)*70])} do {sleep (.5);}; //Get the speed the ship is approachin the shore at so we can keep this constant and natural looking _shipVel = velocity _ship; //Tell the ship driver to shut up and wait driver _ship disableai "MOVE"; //Keep forcing the ship to the shoreline until we are 12m form the shore (our launching distance) while {(alive _ship) and (surfaceIsWater [(getpos _ship select 0) + sin(getdir _ship)*12, (getpos _ship select 1) + cos(getdir _ship)*12])} do { _ship setvelocity _shipVel; sleep (.5); }; //open ramp _ship animate ["lcuramp",1]; //bring ship to complete stop slowely so it looks like were beached while {((velocity _ship select 0) > .5) or ((velocity _ship select 1) > .5)} do { _ship setvelocity [((velocity _ship select 0) * .5),((velocity _ship select 1) * .5),((velocity _ship select 2) * .5)]; sleep (.2); }; _ship setvelocity [0,0,0]; sleep 2; //Get the heck out detach _vehicleA; _GetOutVel = [sin(getdir _ship)*3,cos(getdir _ship)*3,0]; while {_ship distance _vehicleA < 14} do {_vehicleA setvelocity [sin(getdir _ship)*2,cos(getdir _ship)*2,(velocity _vehicleB select 2)*1.5];sleep (.05);}; driver _VehicleA EnableAI "Move"; group driver _VehicleA setcombatmode "RED"; detach _vehicleB; _GetOutVel = [sin(getdir _ship)*3,cos(getdir _ship)*3,0]; while {_ship distance _vehicleB < 14} do {_vehicleB setvelocity [sin(getdir _ship)*2,cos(getdir _ship)*2,(velocity _vehicleB select 2)*1.5];sleep (.05);}; driver _VehicleB EnableAI "Move"; group driver _VehicleB setcombatmode "RED"; sleep 10; //close the ramp and push back from the shore cus ai are too stupid to do this themselves so we can send the ship elsewhere _ship animate ["lcuramp",0]; _shipVelSlow = [(_shipVel select 0) / -3, (_shipVel select 1) / -3,(_shipVel select 2) / -3]; _shipVelNormal = [(_shipVel select 0) / -2, (_shipVel select 1) / -2,(_shipVel select 2) / -2]; while {(alive _ship) and !(surfaceIsWater [(getpos _ship select 0) + sin(getdir _ship)*15, (getpos _ship select 1) + cos(getdir _ship)*15])} do { _ship setvelocity _shipVelSlow; sleep (.5); }; while {(alive _ship) and !(surfaceIsWater [(getpos _ship select 0) + sin(getdir _ship)*30, (getpos _ship select 1) + cos(getdir _ship)*30])} do { _ship setvelocity _shipVelNormal; sleep (.5); }; //ok, give the AI his brains back driver _ship EnableAI "Move"; Sounds great! Any chance of a demo mission? :) Share this post Link to post Share on other sites